[R] Problem using read.xls - Everything converted to factors

2011-06-03 Thread Sebastian Lerch
o I was wondering if there is another way to let the classes be recognized correctly. Additionally I would like to know if there is any way to import data from different sheets with the same layout at once into one data frame. I use Ubuntu 11.04 with Rkward if this is of any importance. Thank

[R] convert 32bit numbers to 64bit (or float to double)

2010-05-05 Thread Sebastian Gibb
eudo value. Now I know how to calculate these values for my own in R. If I compare the old (C++) values with my new (R) values the differ at position fifth after decimal point and all following. For compatibility reasons I want to get the same values for R like the old C++

[R] Count cases in a list

2010-05-08 Thread Sebastian Kruk
Hi everybody, I would like to count how many times names in list L, nombreL, apear in list C, nombreC. Can I improve the next program? cuenta <- 0 topL <- length(nombreL) topC <- length(nombreC) for (i in 1:topL) { for (j in 1:topC) {

Re: [R] Count cases in a list

2010-05-08 Thread Sebastian Kruk
Hi, for example I have two list: nombreL <- c("Alvaro Perez", "Sebastián García", "Luis Gomez", "Jorge Rial", "Ronaldo Apud",..., "Ana María Bianco") nombreC <- c("Alvaro",..., "Ana",...,"Jorge",...,

Re: [R] Count cases in a list

2010-05-08 Thread Sebastian Kruk
2010/5/8 Tal Galili : > Hi Sebastian, > Please check if this does what you want: > > nombreL <- c("Alvaro Perez", "Sebastián García", "Luis Gomez", "Jorge Rial", > "Ronaldo Apud", "Ana María Bianco") > nombreC <- c

Re: [R] Count cases in a list

2010-05-08 Thread Sebastian Kruk
One last thing, i want to know in which position was founded every name. 2010/5/8 Tal Galili : > There you go: > > nombreL <- c("Alvaro Perez", "Sebastian García","Sebastian 2", "Luis Gomez", > "Jorge Rial", "Ronaldo Apud

Re: [R] Count cases in a list

2010-05-10 Thread Sebastian Kruk
I would like to obtain a matrix 2010/5/8 Tal Galili : > Here is one way for doing that: > nombreL <- c("Alvaro Perez", "Sebastian García","Sebastian 2", "Luis Gomez", > "Jorge Rial", "Ronaldo Apud", "Ana María Bi

[R] web mining

2010-05-15 Thread Sebastian Kruk
hi r-help list users I wonder if there is a web mining package? Thanks, Sebastián. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provi

Re: [R] improvement

2010-05-16 Thread Sebastian Kruk
Hi, if i just want a vector filled with names which has length(index) > 0. For example if nombreC <- c("Juan", "Carlos", "Ana", "María") nombreL <- c("Juan Campo", "Carlos Gallardo", "Ana Iglesias", "María Bacaldi", "Juan Grondona", "Dario Grandineti", "Jaime Acosta", "Lourdes Serrano") I would

Re: [R] improvement

2010-05-17 Thread Sebastian Kruk
ex 1 Juan 1 2 Juan 5 3 Carlos 2 4Ana 3 5 María 4 As an result of the do.call I want a data frame where every name has an index > 0. 2010/5/16 : > Hi Sebastian: I'm not sure that I understand what you want but maybe below > is what you want ? I just took

[R] temporal disaggregation

2011-08-15 Thread Sebastian Kruk
Dear R-users, I have an anual info of gross product and I would like to disaggregate to trimestral data. Can I import a matlab library of Quilis? ( http://www.mathworks.com/matlabcentral/fileexchange/24438-temporal-disaggregation-library ) Thanks, Sebastián. ___

[R] Function rank() for data frames (or multiple vectors)?

2011-08-24 Thread Sebastian Bauer
s for your help! Best, Sebastian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Function rank() for data frames (or multiple vectors)?

2011-08-24 Thread Sebastian Bauer
e two vectors such as 1 1 1 2 1 2 1 3 2 1 that I want combinedly ranked. I'd like to get an output 1 2 2 4 5 or (ties.method=average) 1 2.5 2.5 4 5 Basically, I need a function similar to the rank() function that accepts more than one vector (as order() does). Best, Sebastian

Re: [R] Function rank() for data frames (or multiple vectors)?

2011-08-24 Thread Sebastian Bauer
gt;> 4 >> 5 >> >> Basically, I need a function similar to the rank() function that >> accepts >> more than one vector (as order() does). > Can't you just paste the columns and run rank on the results? 'rank' > accepts character vectors. I was

Re: [R] Function rank() for data frames (or multiple vectors)?

2011-08-25 Thread Sebastian Bauer
gives a different value for each element, rank(order()) would return the same result as order() alone. Bye, Sebastian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Function rank() for data frames (or multiple vectors)?

2011-08-29 Thread Sebastian Bauer
> ave(order(rr$a, rr$b), rr$a, rr$b ) [1] 1.0 2.5 2.5 4.0 5.0 Actually, this may be a solution I was looking for! Note that it assumes that rr to be sorted already (hence the first argument of ave could be simply 1:nrow(rr)). Also, by using FUN=min or FUN=max

[R] image.plot for non-regular grid: round pixel

2011-09-22 Thread Sebastian Schubert
d corners look much worse. What can I do to get non-round pixels? Thanks a lot! Sebastian signature.asc Description: This is a digitally signed message part. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

[R] Legend: Custom distance between lines and text

2012-06-09 Thread Sebastian Schubert
Hi, I guess I overlook the corresponding part in the manual but how can I modify the distance between the text and the line in a legend? Thank you for any hints! Sebastian signature.asc Description: OpenPGP digital signature __ R-help@r-project.org

Re: [R] Legend: Custom distance between lines and text

2012-06-09 Thread Sebastian Schubert
d(1, .5, legend=c("foo","bar"), lty=1:2, pch=NA) > legend(1, .25, legend=c("foo","bar"), lty=1:2, pch=NA, x.intersp=2) Thanks a lot. I think I even tried x.intersp before, worked fine now. Sebastian signature.asc Description: OpenPGP digital signatur

[R] eval parse question

2012-06-20 Thread Leuzinger Sebastian
Dear all Is there a more efficient way of achieving the following (assigning to an indexed vector in a loop): test5 <- 1:10 eval(parse(text=paste("test",5,"[",7,"]<- ",0.435,sep=""))) this works, but it is p

[R] Odds Ratios in rms package

2012-06-20 Thread Sebastian Pölsterl
Lower 0.95 Upper 0.95 age 27. 37.0 10. 0.78 0.20 0.401.17 Odds Ratio 27. 37.0 10. 2.19NA 1.493.22 Does anybody know how these values are obtained, especially in the presence of interactions? Best regards, Sebastian ___

Re: [R] Odds Ratios in rms package

2012-06-21 Thread Sebastian Pölsterl
Thanks a lot David, I must have missed this sentence. Best regards, Sebastian Am 20.06.2012 21:05, schrieb David Winsemius: > > On Jun 20, 2012, at 12:12 PM, Sebastian Pölsterl wrote: > >> Hi, >> >> I'm using the rms package to do regression analysis using the

[R] SPATSTAT: Minimum points for a Ripley K to be sensible?

2012-07-01 Thread Sebastian Pucilowski
Hello, What are the minimum number of points in a point pattern before a clustering analysis using a Ripley K function loses any meaning? I haven't been able to find much comment in the literature about this --- instead case examples typically use 100-200 points as a minimum. Regards, Seba

[R] Import big xml data

2011-07-13 Thread Sebastian Kruk
Dear R users, I would like to import a big xml file. I don't want to learn about xml structures, just to import all the data to a data frame. How can I do it? Thanks, Sebastián. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listin

[R] Finding all rows of a matrix equal to vector

2011-07-16 Thread Sebastian Lerch
w can I find out, how many times x1 is a row of A? Thanks in advance and best regards, Sebastian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] time between two dates

2012-03-09 Thread Sebastian Schubert
-11.11.2006 ~= 730 days > start <- strptime("2006", format="%Y%m%d") > end <- strptime("2008", format="%Y%m%d") > end-start Time difference of 731 days HTH Sebastian signature.asc Description: OpenPGP digital signature _

[R] join 2 .sav

2012-03-09 Thread Sebastian Kruk
Dear R-users, __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] aggregate arrays

2012-02-03 Thread Leuzinger Sebastian
ample, it's really the 3-dimensional equivalent for the standard aggregate command. I am sure aggregate() itself can do it, but how do I need to specify the 'by' argument? Any hint (also to an earlier post) appreciated Sebastian __ R-help@r

[R] Two surfaces in one plot with visibility

2012-02-13 Thread Sebastian Schubert
solid thin surfaces, so that for example the order of the plot commands does not matter. Any idea how to do that? Thanks a lot, Sebastian signature.asc Description: OpenPGP digital signature __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Two surfaces in one plot with visibility

2012-02-13 Thread Sebastian Schubert
:persp3d, where your graphics hardware will do > the computations of which surface is in front. Thanks a lot! Works really well and created a "wow" effect (especially when comparing to the manual tuning of the theta and phi angles in persp() ).

[R] Using substitute in nested function calls

2012-02-20 Thread Sebastian Kranz
,-100,100)",sep=""))) } mycurve(x^2) Best regards, Sebastian [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/

Re: [R] Using substitute in nested function calls

2012-02-21 Thread Sebastian Kranz
Thanks, that is exactly what I have been looking for! On Tue, 21 Feb 2012 11:58:01 +0100 Eik Vettorazzi wrote: Hi Sebastian, how about this: mycurve <- function (expr) { do.call(curve,list(substitute(expr),-100,100)) } mycurve(x^2) mycurve(sin(x/20)) mycurve(x+x^2-x^3) cheers

[R] Multidimensional Array: local averaging without knowing number of dimensions

2012-04-18 Thread Sebastian Schubert
d so on. Is there a way to formulate this without writing it for every number of dimension? Cheers Sebastian signature.asc Description: OpenPGP digital signature __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] Don't collapse degenerate array indices

2012-04-19 Thread Sebastian Schubert
ed the degenerate indices. I don't want that. What can I do? Thanks Sebastian signature.asc Description: OpenPGP digital signature __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide h

Re: [R] Don't collapse degenerate array indices

2012-04-19 Thread Sebastian Schubert
On 19/04/12 15:25, Duncan Murdoch wrote: > On 19/04/2012 9:14 AM, Sebastian Schubert wrote: >> Hi, >> >> I want to prohibit the automatic collapsing of degenerate array indices: >> >> > str( array(1,dim=c(3,4,5,1,1)) ) >> num [1:3, 1:4, 1:5, 1, 1] 1 1

Re: [R] Adding more files to list

2012-04-25 Thread Sebastian Gibb
;- (normal+1):(normal+1+length(SpectraCase)); But I would prefer to fetch this information from the MassSpectrum metaData slot: filenames <- sapply(Spectra, function(x) {return(metaData(x)$file); }); normal <- grepl(pattern="/Normal/", x=filenames); classes <- as.factor(ifelse(n

[R] boxplot changes fontsize of labels

2008-06-06 Thread Sebastian Merz
Hi all! So far I learned some R but finilizing my plots so they look publishable seems not to be possible. I set up some boxplots. Everything works well but when I put more then two of them in one plot the labels of the axes appear smaller than the normal font size. > x <- rnorm(30) > y <- rnorm

[R] Editor for Mac OSX

2008-06-18 Thread Sebastian Leuzinger
editors desribed on the R-help site, except Emacs, which I am reluctant to start using. I am on a MacBook Air with OS X 10.5 using R 2.7.0 Thanks Sebastian .. Sebastian Leuzinger McClintock, PhD University of Basel

[R] indicating significant differences in boxplots

2008-07-07 Thread Sebastian Merz
Hi all! Writing a paper using a lot of boxplots I was asked to mark the significant differences between plotted groups using "stars on top". These stars are found freqeuntly in medical papers and printed above boxplots when there is a significant difference (usually using a bar to indicate which

[R] ggplot2 argument handling odd

2008-03-26 Thread Sebastian Weber
d pl2$x2 are the same - they both show an x2 ~ x3 plot since this is the current value of obs. So how can I force the variable name substitution? I tried some combinations of parse/eval/substitute with no success. Thanks for your help in advance. Greetings, Sebastian Weber __

Re: [R] ggplot2 argument handling odd

2008-03-27 Thread Sebastian Weber
way, I would be curious how to do it with qplot. The basic question is: How to pass the string of a variable to a function which is supposed to interpret it. Aka: var <- "magicVar" fun(doSomeMagic(var)) doSomeMagic should then write magicVar a

Re: [R] ggplot2 argument handling odd

2008-03-31 Thread Sebastian Weber
stions must sound like beginner questions - but I have searched archives and documentation without success. As we speak of it - is your book finally out? Greetings, Sebastian Weber On Thu, 2008-03-27 at 07:57 -0500, hadley wickham wrote: > > Ok, I will try that, thanks. BTW, where is thi

[R] behaviour of .Fortran in terms of "double precision" and "real" datatype

2008-04-29 Thread Sebastian Eiser
Fortran programme within a MCMC in R. All arguments for the programme are 'real'. Could somebody explain to me what's going on? Also, feel free to try that on your machine. thanks very much in advance, Sebastian [[alternative HTML version deleted]] __

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Sebastian Eck
ll_clusterX[8] NA NA NA.1 NA NA.2 NA NA.3 NA . . NA.126 NA Again help would be very much appreciated, Sebastian jholtman wrote: > > 'xx1' is a 'factor' and you have to convert

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Sebastian Eck
t;> but that results in all colums being NA. for example: >> >sd_all_clusterX[8] >> NA NA >> NA.1 NA >> NA.2 NA >> NA.3 NA >> . >> . >> NA.126

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Sebastian Eck
le.com/file/p17338101/sd_all_sample sd_all_sample Again thank you for your help, Sebastian -- View this message in context: http://www.nabble.com/Select-certain-elements-from-dataframe-tp17314209p17338101.html Sent from the R help mailing list archive at Nabb

[R] is there something like or() ?

2008-01-07 Thread Sebastian Leuzinger
with the potential or() function leading to what plot(table1[table1$var2=="a" | table1$var2=="b" | table1$var2=="c" | table1$var2=="d","var1"]) would do. thanks for any hint -- Dr. Sebastian Leuzi

Re: [R] R object as a function

2008-01-22 Thread Sebastian Mueller
3]}) } It's a substitution for your myfun1 and it gives back a closure (function with bindings) instead of a numeric. Hope it helps Sebastian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] Removing subtitles in levelplot

2008-09-18 Thread Sebastian Weirich
Hello, probable a simple question, but I’m unaware with it. When plotting something like levelplot(z1+z1~x*y|g), each table has a subtitle containing variable name of z1 respectively z2 and the value of g. How can I remove the subtitles? Thanks a lot, Sebastian -- Ist Ihr Browser Vista

Re: [R] ggplot2: how to combine position=stack and position=dodge in a single graph?

2008-10-26 Thread Sebastian Krollmann
Hi Hadley, I tried to replicate dodging in combination with stacking by facetting as you suggested. In principle this works, but identifying the bars for different years is very difficult, since the all bar colors are the same (see my code below). Is there a way of having the bars within each f

[R] Meta-Analyisis on Correlations

2009-02-13 Thread Sebastian Stegmann
ht be anyone knowing how to conduct a meta-analysis based on correlations in R? Thanks in advance Sebastian P.S.: Of course, I'm dreaming of such a step-by-step-script like the absolutely marvellous ones provided by Bliese for multilevel-analysis in R :-) - Dipl.-Psych. Sebasti

[R] JRI problem with NoClassDefFoundError

2009-02-25 Thread Yakub Sebastian
I tried to run rtest.java (example Java file found together with JRI library). But I got the following error. I run it with NetBeans on Windows XP. run: java.lang.NoClassDefFoundError: Files\R\R-2/8/1\library\rJava\jri Caused by: java.lang.ClassNotFoundException: Files\R\R-2.8.1\library\rJava\jri

[R] How to get JRI to work from my NetBeans

2009-02-25 Thread Yakub Sebastian
Hi, I need your help. I have downloaded a precompiled JRI as part of rJava. I have included rJava as part of my R package libraries. Now I need to be able to work with some R functions from my Java apps. I'm using NetBeans on Windows. I have followed some instructions from http://www.rforge.net/JR

[R] Descriptive stats for factors in SEM

2009-03-04 Thread Sebastian Spaeth
ntion :-). Thanks for any hint, Sebastian Spaeth __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-cont

Re: [R] Descriptive stats for factors in SEM

2009-03-04 Thread Sebastian Spaeth
John Fox wrote: > Dear Sebastian, > > What you're looking for are factor-score coefficients, which would allow you > to estimate the values of the factors from the observed variables. Then, > given the original dataset from which the input-covariance matrix to sem() > was c

[R] Lattice fails to draw insets

2007-10-18 Thread Sebastian Weber
(insetplot##, draw.in="insetvp##"). However there should be a way to circumvent this very cumbersome way. Any ideas would be great. Thanks in advance. Greetings, Sebastian Weber __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] Lattice fails to draw insets

2007-10-19 Thread Sebastian Weber
ave helped you to pin down the error. Ah, and while I am at it: Is there somewhere a documention about all those spacings around a plot? I always go through the actual par-data structures and try to guess which variable is responsible for what. But a definite reference would be helpful. Greetings,

[R] minimize white space around lattice plot

2007-09-13 Thread Sebastian Weber
ix="insetPlot") upViewport() ## draw the actual plot panel.xyplot(...) ## why is this neccessary?? Otherwise I get no lines for the axis ... grid.rect(gp=gpar()) } x<-0:10 y<-x^4 insetPlot <- xyplot(y ~ x, scales=list(log=T), main=NULL, aspect="fill&q

Re: [R] using which to identify a range of values

2008-07-18 Thread Sebastian P. Luque
On Fri, 18 Jul 2008 11:42:09 -0700, sj <[EMAIL PROTECTED]> wrote: [...] > a <- rnorm(1000, 100, 50) which( 100 < a <= 200) > of course this doesn't work but illustrates what I ma trying to do, If > anyone has suggestions I would greatly appreciate it Have a look at ?& -- Seb

[R] GSL in C code for R

2010-04-16 Thread J. Sebastian Tello
include GSL functions into my C functions. Any commentaries, insights or advice will be highly appreciated. Sebastian J. Sebastián Tello Department of Biological Sciences 285 Life Sciences Building Louisiana State University Baton Rouge, LA, 70803 (225) 578-4284 (office and lab

[R] update'ing trellis object

2009-10-03 Thread Sebastian P. Luque
Hi, I thought the following would only remove the legend element of a trellis object, but it actually removes both the legend and key elements: fig <- xyplot(Sepal.Length ~ Petal.Length, groups=Species, data=iris, key=list(x=1, y=0.02, corner=c(1, 0), size=3, between=1,

[R] update'ing trellis object

2009-10-03 Thread Sebastian P. Luque
Hi, I thought the following would only remove the legend element of a trellis object, but it actually removes both the legend and key elements: ------ fig <- xyplot(Sepal.Length ~ Petal.Length, groups=Species, data=iris,

Re: [R] update'ing trellis object

2009-10-04 Thread Sebastian P. Luque
On Sun, 4 Oct 2009 16:14:58 -0400, Gabor Grothendieck wrote: > On Sun, Oct 4, 2009 at 3:45 PM, Deepayan Sarkar > wrote: > Yes, unfortunately the trellis object cannot distinguish between the >> "legend" and the "key" any more. > If you are willing to muck around at the grid level you can do it

[R] suffix convention?

2009-04-23 Thread Sebastian P. Luque
Hi, Is there some convention for choosing 'RData' or 'rda' for binary files written by save() or save.image()? The docs treat these interchangeably. Thanks. Cheers, -- Seb __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

[R] [R-pkgs] diveMove 1.6.0 released

2021-05-17 Thread Sebastian P. Luque
see help(diveMove-defunct) and help(diveMove-deprecated) for details. https://github.com/spluque/diveMove -- Sebastian P. Luque ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages

[R] [R-pkgs] collapse package: Advanced and Fast Data Transformation in R

2020-06-01 Thread Sebastian Martin Krantz
me an e-mail. Best regards, Sebastian [[alternative HTML version deleted]] ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages __ R-help@r-pr

[R] multiple filled.contour() on single page

2013-03-15 Thread Sebastian P. Luque
Hi, It seems as if filled.contour can't be used along with layout(), or par(mfrow) or the like, since it sets the page in a very particular manner. Someone posted a workaround (http://r.789695.n4.nabble.com/several-Filled-contour-plots-on-the-same-device-td819040.html). Has a better approach been

Re: [R] Options to extend memory limit

2012-10-11 Thread Sebastian P. Luque
On Thu, 11 Oct 2012 14:45:16 +0200, wrote: > Dear All, at the moment I am using R for calculations of large > databases. Unfortunately, R only manages to complete certain > operations at some times, and not at others. I usually get the error > message "cannot allocate vector of size XX" > I am

[R] Psudeo R^2 (or other effect size) in spatial gls regressions

2010-07-08 Thread J. Sebastian Tello
the spatial structure, and not only the effect of the predictors in the model. Is there a way to calculate an effect size (e.g. a pseudo R^2) of these “spatial” gls models that only measures the effect of the predictors in the model? I'd really appreciate any insights into this. Very

Re: [R] write.table -- maintain decimal places

2011-01-25 Thread Sebastian P. Luque
On Tue, 25 Jan 2011 16:16:37 -0800, Jim Moon wrote: > Hello, All, How can I maintain the decimal places when using > write.table()? Have a look at ?format.data.frame -- Seb __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

[R] 'panel.smooth' error

2010-08-18 Thread Sebastian P. Luque
Hi, The following call: xyplot(incidence ~ year, melanoma, panel=panel.smooth) produces a blank plot region with an error message: Error using packet 1 plot.new has not been called yet > sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu locale: [1] LC_CTYPE=en_CA.UTF-8

Re: [R] 'panel.smooth' error

2010-08-18 Thread Sebastian P. Luque
On Wed, 18 Aug 2010 13:56:23 -0700 (PDT), Phil Spector wrote: > Sebastian - panel.loess will be more suitable for use with xyplot. To > get both points and the smoothed line, you can use > xyplot(incidence~year,melanoma,panel=function(x,y,...){ > panel.xyplot(x,y,...) pan

[R] L-BFGS-B and parscale in optim()

2011-05-25 Thread Sebastian P. Luque
Hi, When using method L-BFGS-B along with a parscale argument, should the lower and upper bounds provided be on the scaled or unscaled values? Thanks. Cheers, -- Seb __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] L-BFGS-B and parscale in optim()

2011-05-25 Thread Sebastian P. Luque
On Wed, 25 May 2011 23:46:02 +, Ben Bolker wrote: > Sebastian P. Luque gmail.com> writes: >> Hi, >> When using method L-BFGS-B along with a parscale argument, should the >> lower and upper bounds provided be on the scaled or unscaled values? >> Thanks. >

Re: [R] L-BFGS-B and parscale in optim()

2011-05-25 Thread Sebastian P. Luque
On Wed, 25 May 2011 19:33:24 -0500, "Sebastian P. Luque" wrote: > which shows me that the estimate for at least one parameter is outside > the bounds. I meant the value for the parameter during the failing iteration, not the estimate, of

Re: [R] L-BFGS-B and parscale in optim()

2011-05-25 Thread Sebastian P. Luque
On Wed, 25 May 2011 19:33:24 -0500, "Sebastian P. Luque" wrote: > which shows me that the estimate for at least one parameter is outside > the bounds. I'll try to prepare a simplified example to reproduce. I got it, it turned out to be the ndeps being too large so it pus

Re: [R] Group by multiple variables

2011-05-30 Thread Sebastian P. Luque
On Mon, 30 May 2011 16:47:45 -0500, "Mendolia, Franco" wrote: > Hello, I would like to create a group variable that is based on the > values of three variables: > For example, >> dat <- data.frame(A=c(1,1,1,1,1,2,2,2,2,2), > B=c(1,1,1,5,5,5,9,9,9,9), > C=c(1,1,1,1,1,2,2,7,7,

[R] segplot (latticeExtra)

2010-05-24 Thread Sebastian P. Luque
Hi, I'm having a bit of trouble with 'scales="free"' in the segplot() function of latticeExtra. Say we need panels for each year, showing only those counties that are represented in each one: ------ library(latticeExtra) data(U

Re: [R] combining expressions in mathplot

2010-06-08 Thread Sebastian P. Luque
On Wed, 9 Jun 2010 00:15:19 -0400, "RICHARD M. HEIBERGER" wrote: > text(5,1, parse(text=paste(deparse(aa[[1]]), deparse(bb[[1]]), > sep="~"))) text(5,2, parse(text=paste(deparse(aa[[1]]), > deparse(bb[[1]]), sep="~', '~"))) > Is there a cleaner way of combining the expressions aa and bb to get >

[R] tryCatch in a package

2012-03-07 Thread Sebastian P. Luque
Hi, Suppose we have a general function that returns a logical indicating which values in 'x' are found in 'l', throwing an error if none are found and a warning if only some are found: "checkFun" <- function(l, x) { xinl <- x %in% l if (! any(xinl)) stop("none of the x values found in l")

[R] [R-pkgs] diveMove 1.3.1

2012-03-14 Thread Sebastian P. Luque
/Tk widgets, to accomodate for changes in R 2.14.2. Legend is plotted only if there is at least one level in the phase factor. Cheers, -- Sebastian P. Luque, Ph.D. Department of Biological Sciences University of Manitoba http://www.ucs.mun.ca/~sluque _

Re: [R] Default Argument Passing in Script

2008-06-11 Thread Sebastian P. Luque
On Wed, 11 Jun 2008 21:01:54 +0800, "Gundala Viswanath" <[EMAIL PROTECTED]> wrote: > Hi all, Currently I run R script with arguments the following ways > $ R --vanilla < myscript.R ARGUMENT1 I don't think that call could possibly recognize ARGUMENT1 in myscript.R, according to the docs. > And

Re: [R] passing a variable at the command line

2008-07-01 Thread Sebastian P. Luque
Hi Erin, On Tue, 1 Jul 2008 18:49:02 -0500, "Erin Hodgess" <[EMAIL PROTECTED]> wrote: > Dear R People: I have used > ./R --no-save -q -f e.in >stuff.out > with great success on SUSE10.1 with R-2.7.1. > My question is, please: is there a way to pass in a variable to the > e.in file? I'm fairl

Re: [R] subset and boxplots

2008-04-22 Thread Sebastian P. Luque
On Tue, 22 Apr 2008 07:55:41 -0800, "Marlin Keith Cox" <[EMAIL PROTECTED]> wrote: > R users, This should be simple, but I cannot figure it out. I import > test.csv, then create a subset for "brook_dis". When I plot (week, R) > I get a nice boxplot, but along the x axis, there are weeks a, b, c >

[R] Sweave data-figure coupling

2009-01-05 Thread Sebastian P. Luque
Hi, With the following Sweave minimal file: ------ \documentclass{article} \usepackage{Sweave} \begin{document} <>= thetas <- seq(0, 1, by=0.001) prior <- rep(1, length(thetas)) / length(thetas) lik <- dbinom(1, 1, thetas) l

Re: [R] Sweave data-figure coupling

2009-01-05 Thread Sebastian P. Luque
On Mon, 05 Jan 2009 15:14:37 -0500, Duncan Murdoch wrote: [...] > You missed an @ after this chunk. If this is true in the original, > I'm surprised Sweave didn't report an error, but it probably ate up > the second chunk as part of the first. AFAIK there's no need to separate every chunk by "

Re: [R] behavior of "by"

2008-10-28 Thread Sebastian P. Luque
On Tue, 28 Oct 2008 18:04:57 -0700, Jeff Laake <[EMAIL PROTECTED]> wrote: > Any insight into the behavior of "by" in the following case would be > appreciated. There is a note in the help details for "by" about > documenting behavior since v2.7 but I don't entirely understand what > it is saying.

Re: [R] behavior of "by"

2008-10-29 Thread Sebastian P. Luque
On Wed, 29 Oct 2008 10:49:03 -0700, Jeff Laake <[EMAIL PROTECTED]> wrote: > Again thanks for the input. I've been a recipient of this list for > quite a few years although I don't post often. It is an invaluable > resource and I appreciate the effort of all the contributors. I > support a lot o

[R] Estimating R2 value for a unit-slope regression

2008-10-31 Thread J. Sebastian Tello
again at slopes less than 0 (like if negative associations between y and x would be better than a flat line, when the predictor is the same vairable as the dependen this does not make sense again). Any advice, recomendations for appropiate literature, or pieces of code would be highly appr

[R] Calculating R2 for a unit slope regression

2008-11-03 Thread J. Sebastian Tello
Does anyone know of a literature reference, or a piece of code that can help me calculate the amount of variation explained (R2 value), in a regression constrained to have a slope of 1 and an intercept of 0? Thanks! Sebastian J. Sebastián Tello Department of Biological Sciences 285 Life

Re: [R] unable to install rjags on 64-bit Debian Linux (etch)

2008-11-09 Thread Sebastian P. Luque
Hi Roger, On Sat, 08 Nov 2008 14:31:01 -0800, Roger Levy <[EMAIL PROTECTED]> wrote: > While I have been able to install rjags on my Windows computer, oddly > I have been unable to install rjags successfully on my 64-bit Linux > compute server (etch, Linux kernel 2.6.18). I am required to specif

Re: [R] maptools sunrise sunset function

2008-11-10 Thread Sebastian P. Luque
On Mon, 10 Nov 2008 11:20:03 -0800, "Farley, Robert" <[EMAIL PROTECTED]> wrote: > I have a time zone problem. Running the code provided I get the > result in UTC, and a lot of warnings like this: 28: In > as.POSIXlt.POSIXct(x, tz) ... : unknwon timezone 'PST' >> sunrise.set(34.11583, -118.18719,

Re: [R] maptools sunrise sunset function

2008-11-10 Thread Sebastian P. Luque
On Mon, 10 Nov 2008 15:27:52 -0500, "stephen sefick" <[EMAIL PROTECTED]> wrote: > library(maptools) sunrise.set <- function(lat, long, date, > timezone="UTC", num.days=1){ #this needs to be long lat# lat.long <- > matrix(c(long, lat), nrow=1) day <- as.POSIXct(date, tz=timezone) > sequence <- seq(

Re: [R] Gmane-interface

2008-11-19 Thread Sebastian P. Luque
On Wed, 19 Nov 2008 21:49:54 + (UTC), Ben Bolker <[EMAIL PROTECTED]> wrote: [...] > Perhaps you would be willing (in the spirit of improving things) to > go to > http://gmane.org/info.php?group=gmane.comp.lang.r.general&edit=t > and specify some information so that the Gmane people can ch

Re: [R] multiple plots in R

2008-11-23 Thread Sebastian P. Luque
On Sun, 23 Nov 2008 18:19:19 -0800, Suyan Tian <[EMAIL PROTECTED]> wrote: > Hi, I just try to draw multiple plots in one page using R, I used par > command. For example I have 7 plots, but instead of arranging them in > the default way > plot1 plot2 plot3 plot4 plot5 plot6 plot7 > I want them in

[R] NA and logical indexes

2008-11-28 Thread Sebastian P. Luque
Hi, I vaguely remember this issue being discussed at some length in the past, but am having trouble relocating the proper thread (defining an adequate search string to do so): ---<---cut here---start-->--- R> foo <- data.frame(A=gl(2, 5, labels=letters[1:2]), X

Re: [R] NA and logical indexes

2008-11-28 Thread Sebastian P. Luque
On Fri, 28 Nov 2008 22:01:15 - (GMT), (Ted Harding) <[EMAIL PROTECTED]> wrote: [...] > It is not! Oops, of course, I meant to say "return" rather than "set" :-/ [...] > NA can seem to have a bewildering logic, but it all becomes clear if > you interpret NA as "value unkown". > You asked

[R] format.data.frame and NA control

2007-10-22 Thread Sebastian P. Luque
Hi, Is there a more efficient way to output NA strings as empty strings in format.data.frame than this: ---<---cut here---start-->--- R> tt <- data.frame(a=c(NA, rnorm(8), NA), b=c(NA, letters[1:8], NA)) R> tt <- format(tt, digits=5, trim=TRUE) R> tt

Re: [R] The "reverse" of do.call("rbind",) on a list

2007-11-12 Thread Sebastian P. Luque
On Tue, 13 Nov 2007 02:07:39 +0100, Søren Højsgaard <[EMAIL PROTECTED]> wrote: > Dear List, I want to turn the matrix >> xm > [,1] [,2] [1,] "a" "b" [2,] "d" "e" > into a list "by rows" as: [[1]] [1] "a" "b" [[2]] [1] "d" "e" > A (bad?) way of doing this is as >> unlist(apply(xm,1, list), r

<    1   2