[R] lapply not reading arguments from the correct environment

2007-05-18 Thread jiho
myfun() it works but uses the value defined in the general environment and not the one defined in the function. This is with R 2.5.0 on both OS X and Linux (Fedora Core 6) What did I do wrong? Is this indeed a bug? An intended behavior? Thanks in advance. JiHO --- http

Re: [R] lapply not reading arguments from the correct environment

2007-05-18 Thread jiho
On 2007-May-18 , at 17:09 , Thomas Lumley wrote: On Fri, 18 May 2007, jiho wrote: I am facing a problem with lapply which I think''' may be a bug. This is the most basic function in which I can reproduce it: myfun - function() { foo = data.frame(1:10,10:1) foos = list(foo

Re: [R] lapply not reading arguments from the correct environment

2007-05-18 Thread jiho
with [, like: x[,-which(names(x)%in%c(name1,name2))] it's just a little less clear. Thanks again. JiHO --- http://jo.irisson.free.fr/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] displaying intensity through opacity on an image (ONE SOLUTION)

2007-05-19 Thread jiho
/wiki/Vector_Graphics http://en.wikipedia.org/wiki/Raster_graphics Hope that helps. JiHO --- http://jo.irisson.free.fr/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] Comparing multiple distributions

2007-05-21 Thread jiho
much in advance. JiHO --- http://jo.irisson.free.fr/ __ R-help@stat.math.ethz.ch 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

Re: [R] quartz() on MAC OSX

2007-05-21 Thread jiho
session) try TextMate. It costs $40 but it's the only shareware I ever bought and I don't regret a cent of it. Cheers, JiHO --- http://jo.irisson.free.fr/ NB: when I find a little time, I'll add some content to this blog which details how to get Mac OS X behave a little bit more like Linux

[R] plot(......,new=T) vs. par(new=T)

2007-05-21 Thread jiho
that ... arguments are passed to par. What am I missing? JiHO --- http://jo.irisson.free.fr/ __ R-help@stat.math.ethz.ch 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] plot(......,new=T) vs. par(new=T)

2007-05-22 Thread jiho
. Thank you. JiHO --- http://jo.irisson.free.fr/ __ R-help@stat.math.ethz.ch 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

Re: [R] Comparing multiple distributions

2007-05-31 Thread jiho
, at 19:26 , jiho wrote: I am studying the vertical distribution of plankton and want to study its variations relatively to several factors (time of day, species, water column structure etc.). So my data is special in that, at each sampling site (each observation), I don't have *one* number, I

Re: [R] Comparing multiple distributions

2007-05-31 Thread jiho
you very much again. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jiho Subject: Re: [R] Comparing multiple distributions Nobody answered my first request. I am sorry if I did not explain my problem clearly. English is not my native language

Re: [R] Problem with Weighted Variance in Hmisc

2007-06-01 Thread jiho
] 8.68421 # all weights equal 2 = there are two repeats of each element of a var(c(a,a)) [1] 8.68421 wtd.var(a,b,normwt=T) [1] 9.17 var(a) [1] 9.17 Cheers, JiHO --- http://jo.irisson.free.fr/ __ R-help@stat.math.ethz.ch mailing list https

Re: [R] Problem with Weighted Variance in Hmisc

2007-06-01 Thread jiho
at those with 100 samples.}} Cheers, JiHO --- http://jo.irisson.free.fr/ __ R-help@stat.math.ethz.ch 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

[R] x,y,z table to matrix with x as rows and y as columns

2007-07-24 Thread jiho
in advance for your help. JiHO --- http://jo.irisson.free.fr/ __ R-help@stat.math.ethz.ch 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

[R] apply, lapply and data.frame in R 2.5

2007-07-30 Thread jiho
object in R and applying a function to each of its columns/variables appears to me as something one would want to do quite often. Thank you in advance. JiHO --- http://jo.irisson.free.fr/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] apply, lapply and data.frame in R 2.5

2007-07-30 Thread jiho
On 2007-July-30 , at 12:20 , Prof Brian Ripley wrote: On Mon, 30 Jul 2007, jiho wrote: A recent (in 2.5 I suspect) change in R is giving me trouble. I want to apply a function (tolower) to all the columns of a data.frame and get a data.frame in return. Currently, on a data.frame, both apply

[R] superposing lattice plots

2007-08-17 Thread jiho
as the coordinates vectors other than by unrolling the matrix in a data.frame: x y mat 1 1 0.125 1 2 0.1367 1 3 0.2345 and using mat ~ x*y ? Thank you in advance. Sincerely, JiHO --- http://jo.irisson.free.fr

[R] Variance explained by cluster analysis

2007-08-28 Thread jiho
that I could compute? More generally, am I totally wrong in comparing these two methods? Are there some references particularly appropriate to this? (NB: I am already hunting down the Kaufman, L. and Rousseeuw book) Thank you in advance for your help. JiHO --- http://jo.irisson.free.fr

Re: [R] Excel

2007-08-31 Thread jiho
;). JiHO --- http://jo.irisson.free.fr/ __ R-help@stat.math.ethz.ch 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

Re: [R] Problem of vocabulary : retrieve element of a list of a list

2007-08-31 Thread jiho
in the long term. An introduction in english: http://cran.r-project.org/doc/manuals/R-intro.pdf A nice one in French http://www.cran.r-project.org/doc/contrib/Paradis-rdebuts_fr.pdf Cheers, JiHO --- http://jo.irisson.free.fr/ __ R-help