Re: [R] density function

2005-05-11 Thread Hui Han
Thank you very much, Professor Ripley. If possible, could you point me to other packages that you think I should look at for estimating a derivative? Best regards, Hui Prof Brian Ripley wrote: On Tue, 10 May 2005, Hui Han wrote: I wonder if the function density outputs the gaussian mixture

Re: [R] density function

2005-05-11 Thread Suresh Krishna
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/20509.html -s. Hui Han wrote: Thank you very much, Professor Ripley. If possible, could you point me to other packages that you think I should look at for estimating a derivative? Best regards, Hui Prof Brian Ripley wrote: On Tue, 10 May 2005, Hui

[R] R-project wallpapers

2005-05-11 Thread Lukasz Komsta
Dear useRs, I have just rendered 3 wallpapers with R logo: ftp://ftp.ariadna.pl/pub/R-walls/ Hope you will enjoy. Regards, -- Lukasz Komsta Department of Medicinal Chemistry Medical University of Lublin 6 Chodzki, 20-093 Lublin, Poland Fax +48 81 7425165

Re: [R] Does R have a command for sending emails?

2005-05-11 Thread Uwe Ligges
Lapointe, Pierre wrote: This is excellent. It works great even though I'm on Win2k and behind a firewall. I just have one question though, I don't use a function because I sometimes need to add people to my distribtion list. In R, my system(paste()) string is very long and when I try put an enter

Re: [R] Rpy for python2.4 and R.2.1.0 on winXP

2005-05-11 Thread Uwe Ligges
Darren Weber wrote: Has anyone compiled a binary for winXP, with python2.4 and R.2.1.0? If anyone can do this soon, please advise how to pick up the binary installer. The Rpy homepage is http://rpy.sourceforge.net/ What about asking on the mailing list given on that page? Uwe Ligges Best,

Re: [R] sphericity calculation

2005-05-11 Thread Uwe Ligges
Darren Weber wrote: Dear Prof. Baron, thankyou for your pdf paper on using R, at http://www.psych.upenn.edu/~baron/rpsych.pdf I am currently interested in the sphericity notes on pp. 45-47. The equation on p. 46 suggests the following R calculation: D - k^2 * ( mean(diag(S)) - mean(S) )^2 while

[R] Regsubsets()

2005-05-11 Thread Smit, R. \(Robin\) \(IenT\)
Dear List members I am using the regsubsets function to select a few predictor variables using Mallow's Cp: sel.proc.regsub.full - regsubsets(CO2 ~ v + log(v) + v.max + sd.v + tad + no.stops.km + av.stop.T + a + sd.a + a.max + d + sd.d + d.max + RPA + P + perc.stop.T + perc.a.T + perc.d.T +

Re: [R] inserting R code in a latex document

2005-05-11 Thread Uwe Ligges
Thibaut Jombart wrote: Hello, I'm trying to insert R source code (functions) in an appendix of a latex document. I guess the easiest way to do so is to use the package Sweaved (file : Sweaved.sty) provided with the latest R version. Latex succeeds in loading the package, but my problem comes

[R] Subset with selection variable from function argument. Is there another way?

2005-05-11 Thread Fredrik Karlsson
Dear list, I'm making my current code more generic and would like some advise. The basic problem is subset and the name of the column to be compared for selection. What I've come up with is data(mammals) set - bottompremolars subset(mammals, eval(parse(file=,text=set)) 2) This seems a bit

Re: [R] Subset with selection variable from function argument. Is there another way?

2005-05-11 Thread Uwe Ligges
Fredrik Karlsson wrote: Dear list, I'm making my current code more generic and would like some advise. The basic problem is subset and the name of the column to be compared for selection. What I've come up with is data(mammals) set - bottompremolars The line above is a) syntactically incorrect

Re: [R] inserting R code in a latex document

2005-05-11 Thread Jan T. Kim
On Wed, May 11, 2005 at 10:09:07AM +0200, Uwe Ligges wrote: Thibaut Jombart wrote: Hello, I'm trying to insert R source code (functions) in an appendix of a latex document. I guess the easiest way to do so is to use the package Sweaved (file : Sweaved.sty) provided with the latest R

Re: [R] Subset with selection variable from function argument. Is there another way?

2005-05-11 Thread Prof Brian Ripley
On Wed, 11 May 2005, Fredrik Karlsson wrote: Dear list, I'm making my current code more generic and would like some advise. The basic problem is subset and the name of the column to be compared for selection. What I've come up with is data(mammals) set - bottompremolars subset(mammals,

Re: [R] inserting R code in a latex document

2005-05-11 Thread Michael Prager
Thibaut Jombart wrote: I'm trying to insert R source code (functions) in an appendix of a latex document. I guess the easiest way to do so is to use the package Sweaved (file : Sweaved.sty) I have had very good results with the LaTeX package listings. It is easy to use, and it does the job.

Re: [R] inserting R code in a latex document

2005-05-11 Thread Romain Francois
Le 11.05.2005 14:00, Michael Prager a écrit : Thibaut Jombart wrote: I'm trying to insert R source code (functions) in an appendix of a latex document. I guess the easiest way to do so is to use the package Sweaved (file : Sweaved.sty) I have had very good results with the LaTeX package

[R] generalisation in the use of cclust (library cclust)

2005-05-11 Thread emmanuelle . anthoine1
hello, I would like to compare indexes in order to see which clustering algorithm (k- means, k-medoid, hierarchical clustering with euclidean and pearson distance) is more efficient. So I want to calculate the c-index and the db in all those cases(library cclust). To do that I use the cclust

[R] display two pie-charts

2005-05-11 Thread Lars
Hey, i'd like to compose a clock-like looking plot composed out of two circles, each showing the length of a period (to compare them). first, to do so, it looked the easiest by using pie(), just puting multiple pie-charts over each other. the problem is that once the second pie is drawn, it

Re: [R] display two pie-charts

2005-05-11 Thread Romain Francois
Le 11.05.2005 15:43, Lars a écrit : Hey, i'd like to compose a clock-like looking plot composed out of two circles, each showing the length of a period (to compare them). first, to do so, it looked the easiest by using pie(), just puting multiple pie-charts over each other. the problem is that

RE: [R] Change the result data

2005-05-11 Thread bogdan romocea
hec.data -array(c(5,15,20,68,29,54,84,119,14,14,17,26,16,10,94,7), dim=c(4,4), dimnames=list(eye=c(Green,Hazel, Blue, Brown), hair=c(Black, Brown, Red, Blond))) #-- dfr -

Re: [R] How to plot a matrix with 18 rows by row vs. a vector in a single graph, resulting 18 lines with different colors?

2005-05-11 Thread Spencer Graves
Have you considered matplot: matplot(1:3, array(1:6, dim=c(3,2)), type=b) spencer graves Xiao Shi wrote: I have a matrix gene=array(rnorm(180), dim=c(18,10)) and a vector time=c(0, 0.5,2,4,6,8,12,24,48,72). So i can get a plot with plot(time,gene[1,],type=b,col=green) for the first row.So how can

RE: [R] How to plot a matrix with 18 rows by row vs. a vector in a single graph, resulting 18 lines with different colors?

2005-05-11 Thread Liaw, Andy
See ?matplot. E.g., matplot(time, t(gene), type=b, lty=1) Andy From: Xiao Shi I have a matrix gene=array(rnorm(180), dim=c(18,10)) and a vector time=c(0, 0.5,2,4,6,8,12,24,48,72). So i can get a plot with plot(time,gene[1,],type=b,col=green) for the first row.So how can i get all

Re: [R] How to plot a matrix with 18 rows by row vs. a vector in a single graph, resulting 18 lines with different colors?

2005-05-11 Thread Romain Francois
Le 11.05.2005 17:26, Xiao Shi a écrit : I have a matrix gene=array(rnorm(180), dim=c(18,10)) and a vector time=c(0, 0.5,2,4,6,8,12,24,48,72). So i can get a plot with plot(time,gene[1,],type=b,col=green) for the first row.So how can i get all the 18 rows in the same plot VS. the same vector

Re: [R] PDF Arial, Helvetica and Pagemaker 7.0

2005-05-11 Thread Prof Brian Ripley
On Wed, 11 May 2005, Neuro LeSuperHéros wrote: Do give your real name and affiliation! What exactly are you trying to hide? Why don't you ask on a PageMaker list how to get it to accept valid PDF? This is a bug in PageMaker, not in R. I can generate PDF documents and they look good on acrobat

[R] lme How to validate a model with a validation set and a test set

2005-05-11 Thread Laurent Fanchon
Dear all, I am still trying to fit a model for habituation with lme (Dogs are trotting on a treadmill once a week during 4 consecutive weeks). I have maybe found a good one. In order to validate it, I would like to split my data. I have 28 dogs, I am thinking to build the model with 20 and use

[R] simplify loop

2005-05-11 Thread Omar Lakkis
Is there a way to implement this faster than doing it in a loop. for (i in length(settle)-1:1) { settle[i] = settle[i+1]/(1 + settle.pct[i+1]) } I want to guarantee that i+1 is calculated before i __

Re: [R] simplify loop

2005-05-11 Thread Achim Zeileis
On Wed, 11 May 2005 13:05:58 -0400 Omar Lakkis wrote: Is there a way to implement this faster than doing it in a loop. for (i in length(settle)-1:1) { settle[i] = settle[i+1]/(1 + settle.pct[i+1]) } I want to guarantee that i+1 is calculated before i

Re: [R] simplify loop

2005-05-11 Thread Prof Brian Ripley
It is, backwards, a cumulative product so you could use cumprod. On Wed, 11 May 2005, Omar Lakkis wrote: Is there a way to implement this faster than doing it in a loop. for (i in length(settle)-1:1) { settle[i] = settle[i+1]/(1 + settle.pct[i+1]) } I want to guarantee

Re: [R] simplify loop

2005-05-11 Thread Barry Rowlingson
Omar Lakkis wrote: Is there a way to implement this faster than doing it in a loop. for (i in length(settle)-1:1) { settle[i] = settle[i+1]/(1 + settle.pct[i+1]) } You dont need a loop at all here. How so? Well, as it is written the code in the for loop only

[R] Tukey HSD

2005-05-11 Thread Erin Hodgess
Hi all! __ 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

[R] wireframe (reloaded): how to remove the frame around my plot?

2005-05-11 Thread Marco Chiarandini
Hello, I would like to remove the frame from wireframe, but that one only. I am currently doing trellis.par.set(axis.line,list(col=NA,lty=1,lwd=1)) but this has the flaw that also the tick lines of the axes disapper. I read all the thread with the same titlee of this message appeared

[R] Clear RGUI console under WinXP

2005-05-11 Thread OlsenN
Hi, The recent thread on how to send mail from R got me thinking about a solution to clearing the rgui console under WinXP (something I've often wanted to do and I've seen others ask about). If you create a small vb script, say called RClear.vbs: Dim wsh Set wsh = CreateObject(WScript.Shell)

RE: [R] lme How to validate a model with a validation set and a t est set

2005-05-11 Thread Austin, Matt
If you used all 28 animals to find the model out of a group of candidate models, I would have my reservations about this 'validation'. Any confidence intervals you get from the final model are bound to be overly optimistic because you haven't accounted for the degrees of freedom chewed up during

Re: [R] wireframe (reloaded): how to remove the frame around my plot?

2005-05-11 Thread Deepayan Sarkar
On Wednesday 11 May 2005 12:35, Marco Chiarandini wrote: Hello, I would like to remove the frame from wireframe, but that one only. I am currently doing trellis.par.set(axis.line,list(col=NA,lty=1,lwd=1)) but this has the flaw that also the tick lines of the axes disapper. I should add

[R] Erro loading library from apache

2005-05-11 Thread Cristiane Rocha
Hello, I'm having a error message when I try to load the som library from a cgi. When a run my script via web the following error appears in the apache log: Error: package som was built for i686-pc-linux-gnu, referer: https:// I call the library function setting the path to the library

Re: [R] time zones, daylight saving etc.

2005-05-11 Thread Gabor Grothendieck
You could use the chron package. It represents date times without using time zones so you can't have this sort of problem. On 5/10/05, Carla Meurk [EMAIL PROTECTED] wrote: Hi, I have a whole bunch of data, which looks like: 15/03/2003 10:20 1 15/03/2003 10:21 0 15/03/2003

Re: [R] density function

2005-05-11 Thread Hui Han
Thank you so much, Suresh. I searched a lot on density among R email archives. Should have searched using derivative. Hui Suresh Krishna wrote: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/20509.html -s. Hui Han wrote: Thank you very much, Professor Ripley. If possible, could you point me to

[R] aggregate

2005-05-11 Thread Omar Lakkis
I have a data frame of daily open, high, low and settle prices. How can I aggregate this data weekly? The data frame has five columns, the first is the date column and the rest are the prices. __ R-help@stat.math.ethz.ch mailing list

RE: [R] aggregate

2005-05-11 Thread bogdan romocea
Assuming dfr[day,o,h,l,c] and day like 2004-12-28: dt - strptime(as.character(dfr$day),format=%Y-%m-%d) + 0 wk - format(dt,%Yw%U) aggr - aggregate(list(dfr$o,dfr$h,dfr$l,dfr$c),list(wk),mean) colnames(aggr) - etc -Original Message- From: Omar Lakkis [mailto:[EMAIL PROTECTED] Sent:

Re: [R] aggregate

2005-05-11 Thread bogdan romocea
In fact since you have dates and not datetimes use as.Date() instead of strptime(). On 5/11/05, bogdan romocea wrote: Assuming dfr[day,o,h,l,c] and day like 2004-12-28: dt - strptime(as.character(dfr$day),format=%Y-%m-%d) + 0 wk - format(dt,%Yw%U) aggr -

[R] assigning to a list in a package environment

2005-05-11 Thread Sean Davis
I have a list in a package environment assign('refflat',list(),pos='package:locPkg') to which I would like to make assignments like: refflat[['a']] - read.table('fileA.txt') refflat[['b']] - read.table('fileB.txt') I am doing this to guard against a local version of refflat hanging around, as I

[R] 2 factor ANOVA and sphericity

2005-05-11 Thread Darren Weber
With respect to calculating the epsilon index of sphericity for ANOVA, discussed on pp. 45-47 of: http://www.psych.upenn.edu/~baron/rpsych.pdf It notes that epsilon is not required for a repeated measures design with only k=2 levels, as the minimum value of epsilon (e) is given by: e =

RE: [R] string syntactic sugar in R? - long post

2005-05-11 Thread Brahm, David
charles loboz [EMAIL PROTECTED] wrote: A gstring is a string with variable names embedded and replaced by values(converted to strings, lazy eval) before use. I use the following function, which will take variables either from named arguments or from the environment. It also concatenates all

Re: [R] display two pie-charts

2005-05-11 Thread Jim Lemon
Lars wrote: Hey, i'd like to compose a clock-like looking plot composed out of two circles, each showing the length of a period (to compare them). first, to do so, it looked the easiest by using pie(), just puting multiple pie-charts over each other. the problem is that once the second pie is

[R] Graphics file to disk

2005-05-11 Thread Guy Forrester
Dear All, I have some code that works in S-Plus for writing saving a graphics file to disk :- graphsheet(type = auto, format = WMF, file = G:\\north0l.wmf, pages = auto, print.background = F, orientation=landscape, color.style=color) plot(x,y) dev.off() This works fine in

RE: [R] Graphics file to disk

2005-05-11 Thread Francisco J. Zagmutt
Hi Guy Try savePlot(MyPlot, bmp). Cheers Francisco PS: Hang in there! In the long run the effort to move from S-Plus to R is definitively worthy! From: Guy Forrester [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject: [R] Graphics file to disk Date: Thu, 12 May 2005 11:08:17 +1200 Dear All,

RE:[R] Graphics rile to disk

2005-05-11 Thread Guy Forrester
Many thanks to all who replied, In no particular order:- Tom Mulholland, Gunter Berton, Andrew Ward, Francisco Zagmutt, N. Olsen all is well Cheers Guy Guy J Forrester Biometrician Manaaki Whenua - Landcare Research PO Box 69,

Re: [R] Graphics file to disk

2005-05-11 Thread Michael Prager
If you want to write directly to file, ?Devices will get you more information Guy Forrester wrote on 5/11/2005 7:08 PM: Dear All, I have some code that works in S-Plus for writing saving a graphics file to disk :- [...] -- Michael H. Prager, Ph.D. Population Dynamics Team NOAA Center for Coastal

Re: [R] Multiple IF statements - is there a better alternative?

2005-05-11 Thread Suresh Krishna
are you looking for something like: InternalMean - mean(data1[,3]) TestValues - c(0,1,2,4,9) #should be in increasing order TestResults - c(.95, .85, .7, NaN,0) if (InternalMean==0) IntResult=1 else IntResult=TestResults[which(TestValues==max(TestValues[TestValuesInternalMean]))] -s. Jones, Glen

Re: [R] Multiple IF statements - is there a better alternative?

2005-05-11 Thread Suresh Krishna
oops, i meant something more like: TestValues - c(0,1,2,4,9) #should be in increasing order TestResults - c(.95, .85, .7, NaN,0) if (InternalMean==0) IntResult=1 else IntResult=TestResults[TestValues==max(TestValues[TestValues=InternalMean])] -s. Suresh Krishna wrote: are you looking for

Re: [R] 2 factor ANOVA and sphericity

2005-05-11 Thread John Sorkin
Darren is of course correct, but I hope the following, brief, intentionally non-technical explanation will help: Repeated measures analyses are needed only when there are three or more measurements from a given experimental unit and the two or more measurements are both on the right hand side of

Re: [R] time zones, daylight saving etc.

2005-05-11 Thread Prof Brian Ripley
Would it not just be easier to set the timezone to GMT for the duration of the calculations? I don't see an OS mentioned here, but on most TZ=GMT for the session will do it. On Thu, 12 May 2005, Rich FitzJohn wrote: Hi, seq.dates() in the chron package does not allow creating sequences by