[R] ggplot2: qplot won't work

2010-05-12 Thread Ralf B
I have a script running in the StatET Eclipse environment that executes the ggplot2 command qplot in a function: # Creates the plot createPlot <- function(){ print("Lets plot!") qplot(1:10, letters[1:10]) } When executing the qplot line directly, it works. When executing the scrip

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-12 Thread Shi, Tao
Hi Peter, You're absolutely correct! The description for 'range' in 'boxplot' help file is a little bit confusing by using the words "interquartile range". I think it should be changed to the "length of the box" to be exact and consistent with those in the help file for "boxplot.stats". ...T

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread RICHARD M. HEIBERGER
On Wed, May 12, 2010 at 7:07 PM, Erich Studerus wrote: > Thanks again. It finally worked after copying the Sweave.sh file to a path > that contains no spaces. Is there a special command for windows specific > path names with spaces? > > Erich > Use the 8.3 filename. From the MSDOS cmd window, yo

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Duncan Murdoch
On 12/05/2010 7:07 PM, Erich Studerus wrote: Thanks again. It finally worked after copying the Sweave.sh file to a path that contains no spaces. Is there a special command for windows specific path names with spaces? Putting the path in double quotes might work, but I've no idea how to tel

Re: [R] Boxplot position on X-axis relative to it's value

2010-05-12 Thread Felix Andrews
Dennis, this works for me: xyplot(nmgml ~ day, data = girafe, horizontal = FALSE, panel = function(...) { panel.bwplot(...) panel.average(..., fun = median, col.line = 'gray30') } ) On 13 May 2010 06:29, Dennis Murphy wrote: > Hi: > > Here are a couple of

Re: [R] vectorize a power analysis?

2010-05-12 Thread jim holtman
You should profile (Rprof) your code to see where it is spending it time; this will point you to what needs to be optimized. On Wed, May 12, 2010 at 3:34 PM, Jack Siegrist wrote: > > We are doing a power analysis by generating noisy data sets according to a > model, fitting the model to the data,

Re: [R] R version of SAS/IntrNet

2010-05-12 Thread Scott Czepiel
I recall hearing about -- or was I just dreaming? -- a way to compile R as an apache module so it could stay in memory while the webserver was running. The alternative is to simply use cgi in perl or python or whatever to gather user input, execute R in batch mode, grab the output file and parse i

Re: [R] Path to R script

2010-05-12 Thread Gabor Grothendieck
If you are running the file via source("myfile.R") then just put this in the file: this.dir <- dirname(sys.frame(1)$ofile) This is a bit fragile since changes to the internals of source could break it but it does currently work. On Wed, May 12, 2010 at 3:31 PM, Johannes W. Dietrich wrote: > The

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Frank E Harrell Jr
On 05/12/2010 03:33 PM, Shi, Tao wrote: Hi Ista, Thanks for the reply! You actually misunderstood me. I never objected the "tmp<- latex(x)" method (in fact, that's what I'm doing now in my .Rnw file). As I stated in my original post, I'm simply curious about what causes the error window and

Re: [R] Vectorized expression to extrapolate matrix columns with columns of another matrix

2010-05-12 Thread Gabor Grothendieck
I have managed to reduce it to two statements using the trick that the elements of x-x are NA or 0 according to whether the corresponding element of x is NA or not. You could probably extend this to your situation too. > library(zoo) > m <- zoo(cbind(c(1, 2, NA, NA, 5, NA, NA), seq(7)^2), as.Date

Re: [R] Path to R script

2010-05-12 Thread David Scott
David Scott wrote: Sharpie wrote: Johannes W. Dietrich wrote: There is certainly a trivial solution for my question, but I can't find the answer in the documentation. I need a platform independent method to obtain the file path of the current R script. My working group uses R on several ma

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Erich Studerus
Thanks again. It finally worked after copying the Sweave.sh file to a path that contains no spaces. Is there a special command for windows specific path names with spaces? Erich On Wed, 12 May 2010 18:04:44 -0400 Duncan Murdoch wrote: On 12/05/2010 5:12 PM, Erich Studerus wrote: You were r

Re: [R] Path to R script

2010-05-12 Thread David Scott
Sharpie wrote: Johannes W. Dietrich wrote: There is certainly a trivial solution for my question, but I can't find the answer in the documentation. I need a platform independent method to obtain the file path of the current R script. My working group uses R on several machines with differe

Re: [R] A primitive OO in R -- where next?

2010-05-12 Thread Gabor Grothendieck
There is a paper on the proto home page http://r-proto.googlecode.com -- click on External Links on the right of the home page and see Prototype-Based Programming in Statistical Computation. On Wed, May 12, 2010 at 5:48 PM, Ted Harding wrote: > Greetings All, > > Out of curiosity, I've just done

[R] Revolutions Blog: April Roundup

2010-05-12 Thread David Smith
I write about R every weekday at the Revolutions blog: http://blog.revolutionanalytics.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. By the way, you might have noticed that we've changed our name to Revolution Analytics from

Re: [R] A primitive OO in R -- where next?

2010-05-12 Thread Sharpie
Ted.Harding-2 wrote: > > Greetings All, > > Out of curiosity, I've just done a very primitive experiment: > > Obj <- list(Fun=sum, Dat=c(1,2,3,4)) > Obj$Fun(Obj$Dat) > # [1] 10 > > That sort of thing (much more sophisticated) must be documented > mind-blowingly somewhere. Where? > > Wh

Re: [R] A primitive OO in R -- where next?

2010-05-12 Thread Ted Harding
On 12-May-10 22:24:21, Erik Iverson wrote: > (Ted Harding) wrote: >> Greetings All, >> >> Out of curiosity, I've just done a very primitive experiment: >> >> Obj <- list(Fun=sum, Dat=c(1,2,3,4)) >> Obj$Fun(Obj$Dat) >> # [1] 10 >> >> That sort of thing (much more sophisticated) must be docu

Re: [R] Path to R script

2010-05-12 Thread Sharpie
Johannes W. Dietrich wrote: > > There is certainly a trivial solution for my question, but I can't > find the answer in the documentation. > > I need a platform independent method to obtain the file path of the > current R script. > > My working group uses R on several machines with differen

Re: [R] RSQLite equivalent of .schema?

2010-05-12 Thread Seth Falcon
On 5/12/10 9:58 AM, Jonathan Greenberg wrote: Rhelpers: (Thanks for the previous help with getting a "where" statement working). Now on to my next question -- our database guru has asked me to run ".schema" on an sqlite database, and I was wondering if there is an equivalent in R to do this? T

Re: [R] A primitive OO in R -- where next?

2010-05-12 Thread Erik Iverson
(Ted Harding) wrote: Greetings All, Out of curiosity, I've just done a very primitive experiment: Obj <- list(Fun=sum, Dat=c(1,2,3,4)) Obj$Fun(Obj$Dat) # [1] 10 That sort of thing (much more sophisticated) must be documented mind-blowingly somewhere. Where? Where I stand right now: Th

Re: [R] dev.off(): is there a 'quiet'-mode?

2010-05-12 Thread Ted Harding
On 12-May-10 22:09:18, Marius Hofert wrote: > Dear R experts, > On shutting down a device with dev.off(), the number and name of the > new active device is returned/printed. How can this be prevented from > being shown? Is there something like a 'quiet'-mode? > > Cheers, > marius I don;t know abo

Re: [R] dev.off(): is there a 'quiet'-mode?

2010-05-12 Thread Duncan Murdoch
On 12/05/2010 6:09 PM, Marius Hofert wrote: Dear R experts, On shutting down a device with dev.off(), the number and name of the new active device is returned/printed. How can this be prevented from being shown? Is there something like a 'quiet'-mode? Like any other expression, if you assign t

Re: [R] reading in all files of a certain type

2010-05-12 Thread Dimitri Liakhovitski
Thanks a lot, Henrique, will try! Dimitri On Wed, May 12, 2010 at 3:41 PM, Henrique Dallazuanna wrote: > Try this: > > do.call(rbind, lapply(dir(patt = "\\.csv$"), read.csv)) > > On Wed, May 12, 2010 at 4:32 PM, Dimitri Liakhovitski > wrote: >> >> Hello, >> >> I am wondering if it's possible to

Re: [R] Calling a list element

2010-05-12 Thread Erik Iverson
The key is that "[" is a function. So, you have a list, you want to apply a function to a list, and return a vector, think sapply. sapply(strsplit(as.character(Elecciones$Municipios),"\\."), "[", 1) Luis Felipe Parra wrote: Hello, i have the following list strsplit(as.character(Elecciones

Re: [R] R 2.11 on redhat el5/x86_64?

2010-05-12 Thread Dick Beyer
Hi Marc, Thanks for the links. This is very helpful. I'm very grateful. Cheers, Dick *** Richard P. Beyer, Ph.D. University of Washington Tel.:(206) 616 7378 Env. & Occ. Health Sci. , Box 354695 Fax: (206) 685 4696

Re: [R] exact the variables used in tree construction

2010-05-12 Thread Changbin Du
Thanks so much, David! On Wed, May 12, 2010 at 2:52 PM, David Winsemius wrote: > > On May 12, 2010, at 5:31 PM, Changbin Du wrote: > > fit.dimer <- rpart(as.factor(out) ~ ., method="class", data=p_df) >>> >>> fit.dimer$frame[, "var"] >>> >> [1] NE WC TA WG WD WW WC >

[R] dev.off(): is there a 'quiet'-mode?

2010-05-12 Thread Marius Hofert
Dear R experts, On shutting down a device with dev.off(), the number and name of the new active device is returned/printed. How can this be prevented from being shown? Is there something like a 'quiet'-mode? Cheers, marius __ R-help@r-project.org mai

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Duncan Murdoch
On 12/05/2010 5:12 PM, Erich Studerus wrote: You were right, that I would run into trouble with all these "". However, the second method doesn't work either. Somehow, the UTF8Sweave.sh file is not found during the compilation of my document. It says "can't open perl script .../bin/UTF8Sweave.sh

Re: [R] A primitive OO in R -- where next?

2010-05-12 Thread Steve Lianoglou
Hi, On Wed, May 12, 2010 at 5:48 PM, Ted Harding wrote: > Greetings All, > > Out of curiosity, I've just done a very primitive experiment: > >  Obj <- list(Fun=sum, Dat=c(1,2,3,4)) >  Obj$Fun(Obj$Dat) >  # [1] 10 > > That sort of thing (much more sophisticated) must be documented > mind-blowingly

Re: [R] exact the variables used in tree construction

2010-05-12 Thread David Winsemius
On May 12, 2010, at 5:31 PM, Changbin Du wrote: fit.dimer <- rpart(as.factor(out) ~ ., method="class", data=p_df) fit.dimer$frame[, "var"] [1] NE WC TA WG WD WW WC [11]CT FC YG QT [21] NW DP DY SK [31] 401 Levels:

[R] A primitive OO in R -- where next?

2010-05-12 Thread Ted Harding
Greetings All, Out of curiosity, I've just done a very primitive experiment: Obj <- list(Fun=sum, Dat=c(1,2,3,4)) Obj$Fun(Obj$Dat) # [1] 10 That sort of thing (much more sophisticated) must be documented mind-blowingly somewhere. Where? Where I stand right now: The above (and its immediat

[R] exact the variables used in tree construction

2010-05-12 Thread Changbin Du
> fit.dimer <- rpart(as.factor(out) ~ ., method="class", data=p_df) > > fit.dimer$frame[, "var"] [1] NE WC TA WG WD WW WC [11]CT FC YG QT [21] NW DP DY SK [31] 401 Levels: AA AC AD AE AF AG AH AI AK AL AM AN AP AQ AR AS AT A

Re: [R] Calling a list element

2010-05-12 Thread David Winsemius
On May 12, 2010, at 5:18 PM, Luis Felipe Parra wrote: Hello, i have the following list strsplit(as.character(Elecciones$Municipios),"\\.") [[1]] [1] "ANTIOQUIA" "ABEJORRAL" [[2]] [1] "META""ACACIAS" [[3]] [1] "CASANARE" "AGUAZUL" [[4]] and I would like to make a vector of the first element

Re: [R] Splines under tension

2010-05-12 Thread David Winsemius
On May 12, 2010, at 2:41 PM, David Winsemius wrote: On May 12, 2010, at 2:37 PM, Greg Snow wrote: I think this last line is a fortune candidate: It's not just that different disciplines rediscover the same ideas, they also relabel them. With apologies to Aretha: I second that emotion.

Re: [R] Calling a list element

2010-05-12 Thread Henrique Dallazuanna
Try this: sapply(strsplit(as.character(Elecciones$Municipios),"\\."), '[[', 1) On Wed, May 12, 2010 at 6:18 PM, Luis Felipe Parra < felipe.pa...@quantil.com.co> wrote: > Hello, i have the following list > strsplit(as.character(Elecciones$Municipios),"\\.") > [[1]] > [1] "ANTIOQUIA" "ABEJORRAL" >

[R] Calling a list element

2010-05-12 Thread Luis Felipe Parra
Hello, i have the following list strsplit(as.character(Elecciones$Municipios),"\\.") [[1]] [1] "ANTIOQUIA" "ABEJORRAL" [[2]] [1] "META""ACACIAS" [[3]] [1] "CASANARE" "AGUAZUL" [[4]] and I would like to make a vector of the first element of each of the list items, in this case ANTIOQUIA, META, C

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Erich Studerus
You were right, that I would run into trouble with all these "". However, the second method doesn't work either. Somehow, the UTF8Sweave.sh file is not found during the compilation of my document. It says "can't open perl script .../bin/UTF8Sweave.sh: No such file or directory". I double checked

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-12 Thread Peter Ehlers
On 2010-05-12 13:27, Shi, Tao wrote: Jason, All these are clearly defined in the help file for 'boxplot' under 'range'. Don't understand how you missed that. ...Tao You've made me re-read the help page for boxplot. I notice that there's a difference in the description of 'range' on that pa

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Duncan Murdoch
On 12/05/2010 4:33 PM, Shi, Tao wrote: Hi Ista, Thanks for the reply! You actually misunderstood me. I never objected the "tmp <- latex(x)" method (in fact, that's what I'm doing now in my .Rnw file). As I stated in my original post, I'm simply curious about what causes the error window and

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Shi, Tao
Hi Ista, Thanks for the reply! You actually misunderstood me. I never objected the "tmp <- latex(x)" method (in fact, that's what I'm doing now in my .Rnw file). As I stated in my original post, I'm simply curious about what causes the error window and wanted to get to the bottom of it. ...

Re: [R] Boxplot position on X-axis relative to it's value

2010-05-12 Thread Dennis Murphy
Hi: Here are a couple of ways to superimpose the boxplots with a line, using lattice and latticeExtra. Notice that the boxplots are located at the observed x values - the idea comes straight out of the example on p. 183 of the Lattice book. library(lattice) library(latticeExtra) # Connect the me

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Ista Zahn
On Wednesday 12 May 2010 3:58:08 pm Shi, Tao wrote: > Erik, No, you didn't misunderstand my question. > > > Ista, > > I have no access to LaTex now, so I can't test your solution right away. > My understanding to your solution is that, basically, you just let 'latex' > function generate the te

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Duncan Murdoch
On 12/05/2010 3:55 PM, Erich Studerus wrote: Thanks again. Putting options(encoding="") into the R code chunk before calling the read.xls function indeed did the trick. Now, I have one last question: How can I edit the LyX preference file to call R with options(encoding='UTF-8'). I prefer to ed

Re: [R] Path to R script

2010-05-12 Thread Shi, Tao
Don't quite understand your question, but it looks like a more IT issue to me. I guess you store your R scripts in a central location (e.g. a server) and everybody call them from their own workstation, right? Or you can always bundle your R scripts into a package and distribute it around your

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Shi, Tao
The .dvi file is being created in the working directory for sure, not sure whether it's in the tmp folder or not. (I just tested on my home machine which only has R but no MikTex installed, I can see only .tex file in the tmp folder. No .log file in the tmp folder.) ...Tao - Origina

Re: [R] Path to R script

2010-05-12 Thread Duncan Murdoch
On 12/05/2010 3:31 PM, Johannes W. Dietrich wrote: There is certainly a trivial solution for my question, but I can't find the answer in the documentation. I need a platform independent method to obtain the file path of the current R script. My working group uses R on several machines with d

Re: [R] how to profile R interpreter?

2010-05-12 Thread David Winsemius
On May 12, 2010, at 3:42 PM, xiaoming gu wrote: Thanks for your quick reply, David. Let me make myself more clear. I tried Rprof, which only gives profiling information at script level. My intention is to identify hot spots in R interpreter. I compiled R interpreter with -pg for gprof. How

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Shi, Tao
Erik, No, you didn't misunderstand my question. Ista, I have no access to LaTex now, so I can't test your solution right away. My understanding to your solution is that, basically, you just let 'latex' function generate the tex text which is directly incorporated into the big .tex file (ra

[R] ff for 64 bit R for windows gui?

2010-05-12 Thread Hunsicker, Lawrence
Hi, folks: I am running 64-bit R on a 64 bit machine under 64 bit Windows 7. I'd like to try the package ff, but it is not clear to me whether the current version of ff will work in a 64 bit environment. The windows version is "compiled," which suggests that there is more than just R p-code. Do

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Erik Iverson
Shi, Tao wrote: Hi Richard, Obviously, the list doesn't like my attachment. Here it is: http://i41.tinypic.com/15qz387.jpg I set the path using Windows control panel. And "didn't work" means I'm still getting the same error window shown above. Well, it's hard to say what's going on unle

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Erich Studerus
Thanks again. Putting options(encoding="") into the R code chunk before calling the read.xls function indeed did the trick. Now, I have one last question: How can I edit the LyX preference file to call R with options(encoding='UTF-8'). I prefer to edit the LyX preference file rather than the Sw

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Shi, Tao
Hi Richard, Obviously, the list doesn't like my attachment. Here it is: http://i41.tinypic.com/15qz387.jpg I set the path using Windows control panel. And "didn't work" means I'm still getting the same error window shown above. ...Tao - Original Message > From: Richard M. Heiber

Re: [R] vectorize a power analysis?

2010-05-12 Thread Chuck Cleland
On 5/12/2010 3:34 PM, Jack Siegrist wrote: > We are doing a power analysis by generating noisy data sets according to a > model, fitting the model to the data, and extracting a p-value. What is the > best way to do this many times? We are just using for loops and it is too > slow because we are rep

Re: [R] Path to R script

2010-05-12 Thread Erik Iverson
While not a direct answer to your question, do ?getwd and ?setwd help at all? Johannes W. Dietrich wrote: There is certainly a trivial solution for my question, but I can't find the answer in the documentation. I need a platform independent method to obtain the file path of the current R scr

Re: [R] how to profile R interpreter?

2010-05-12 Thread xiaoming gu
Thanks for your quick reply, David. Let me make myself more clear. I tried Rprof, which only gives profiling information at script level. My intention is to identify hot spots in R interpreter. I compiled R interpreter with -pg for gprof. However, I couldn't generate gmon.out when I ran the R inter

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Richard M. Heiberger
Shi, Tao wrote: so, I always get the error window (attached) poped out. The image was stripped by the mailer. Please type the text of the error into the body of the email. I tried to include the following into my PATH: "C:\Program Files\MiKTeX 2.7\tex\latex" Where? In the Windows envi

Re: [R] reading in all files of a certain type

2010-05-12 Thread Henrique Dallazuanna
Try this: do.call(rbind, lapply(dir(patt = "\\.csv$"), read.csv)) On Wed, May 12, 2010 at 4:32 PM, Dimitri Liakhovitski < dimitri.liakhovit...@gmail.com> wrote: > Hello, > > I am wondering if it's possible to read in all files of a certain type > - without specifying their names. > For example,

Re: [R] how to profile R interpreter?

2010-05-12 Thread David Winsemius
On May 12, 2010, at 3:22 PM, xiaoming gu wrote: Hi, all. Does anyone know how to profile R interpreter? I've tried gprof but it doesn't work. Thanks. ?Rprof # and perhaps ?system.time # or help(package=rbenchmark) Xiaoming -- David Winsemius, MD West Hartford, CT

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Shi, Tao
Hi Erik, Thanks for the quick reply! My attachment was in .png which should be supported by the list I'm resending it. Yes, I knew by assigning it to an object, I can avoid this. But, I'm curious to know what if I choose to do e.g. just latex(x), how can I get rid of the error window.

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Erik Iverson
Ista Zahn wrote: Hi Tao, I think you just need latex(x, file="") I think I misunderstood the question, I believe that is what is needed here. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

[R] vectorize a power analysis?

2010-05-12 Thread Jack Siegrist
We are doing a power analysis by generating noisy data sets according to a model, fitting the model to the data, and extracting a p-value. What is the best way to do this many times? We are just using for loops and it is too slow because we are repeating the analysis for many parameterizations. I

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Erik Iverson
Shi, Tao wrote: Hi list, Excuse me b/c this is probably a more "TeX" then "R" question. I've been using "latex" function in my .Rnw file to generate tables, but I've always been using it without assigning the result to a object, i.e. x <- matrix(1:6, nrow=2, dimnames=list(c('a','b'),c(

[R] reading in all files of a certain type

2010-05-12 Thread Dimitri Liakhovitski
Hello, I am wondering if it's possible to read in all files of a certain type - without specifying their names. For example, I have 10 .csv files in my working directory. I would like to read them in and bind them all together. I was thinking of writing a loop, read in all files, and then bind the

[R] Path to R script

2010-05-12 Thread Johannes W. Dietrich
There is certainly a trivial solution for my question, but I can't find the answer in the documentation. I need a platform independent method to obtain the file path of the current R script. My working group uses R on several machines with different operating systems including Mac OS X, Wind

Re: [R] a question about "latex" in Hmisc

2010-05-12 Thread Ista Zahn
Hi Tao, I think you just need latex(x, file="") Best, Ista On Wednesday 12 May 2010 3:18:42 pm Shi, Tao wrote: > Hi list, > > Excuse me b/c this is probably a more "TeX" then "R" > question. > > I've been using "latex" function in my .Rnw file to > generate tables, but I've always been using it

Re: [R] manipulating a matrix

2010-05-12 Thread David Winsemius
On May 12, 2010, at 3:14 PM, Clark Johnston wrote: Is there a way to create a new matrix from and existing matrix with A [,1] [,2] [1,] 113 [2.] 218 [3,] 314 [4,] 420 if() B [,1] [,2] [1,] 2 18 [2,] 4 20

Re: [R] manipulating a matrix

2010-05-12 Thread Erik Iverson
Clark Johnston wrote: Is there a way to create a new matrix from and existing matrix with A [,1] [,2] [1,] 113 [2.] 218 [3,] 314 [4,] 420 if(A[,2] > 15) B [,1] [,2] [1,] 2 18 [2,] 4 20 It's

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-12 Thread Shi, Tao
Jason, All these are clearly defined in the help file for 'boxplot' under 'range'. Don't understand how you missed that. ...Tao - Original Message > From: Jason Rupert > To: Dennis Murphy > Cc: R Project Help > Sent: Wed, May 12, 2010 3:40:12 AM > Subject: Re: [R] Whiskers on t

[R] how to profile R interpreter?

2010-05-12 Thread xiaoming gu
Hi, all. Does anyone know how to profile R interpreter? I've tried gprof but it doesn't work. Thanks. Xiaoming [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Changing R opening message

2010-05-12 Thread Erik Iverson
gvrocha wrote: Hi, I am using some python code to execute small R code snippets. I would like to save the messages output to the screen when R is executed. However, I will just save the opening message a zillion times since many thousands of little snippets will be executed. Do

Re: [R] Splines under tension

2010-05-12 Thread Peter Ehlers
On 2010-05-12 12:41, David Winsemius wrote: On May 12, 2010, at 2:37 PM, Greg Snow wrote: I think this last line is a fortune candidate: It's not just that different disciplines rediscover the same ideas, they also relabel them. With apologies to Aretha: I second that emotion. I'm sure

Re: [R] manipulating a matrix

2010-05-12 Thread Henrique Dallazuanna
Try: A[A[,2] > 15,] On Wed, May 12, 2010 at 4:14 PM, Clark Johnston wrote: > > Is there a way to create a new matrix from and existing matrix with > > A > [,1] [,2] > [1,] 113 > [2.] 218 > [3,] 314 > [4,] 420 > > if(A[,2] > 15) > >

Re: [R] difference along a vector

2010-05-12 Thread Henrique Dallazuanna
Try this: n <- 3 apply(embed(a, n + 1)[,c(1, n + 1)], 1, diff) On Wed, May 12, 2010 at 4:06 PM, Clark Johnston wrote: > > I was looking for a function which would take the difference along a > vector? > >a<-c(1,12,23,44,15,28,7,8,9,10) > if I set the number difference to 3 would return > 43 > 2

Re: [R] difference along a vector

2010-05-12 Thread Marc Schwartz
On May 12, 2010, at 2:06 PM, Clark Johnston wrote: > > I was looking for a function which would take the difference along a vector? >> a<-c(1,12,23,44,15,28,7,8,9,10) > if I set the number difference to 3 would return > 43 > 2 > 5 > -37 > -7 > -19 > 3 > > or do I need to write my own function f

[R] a question about "latex" in Hmisc

2010-05-12 Thread Shi, Tao
Hi list, Excuse me b/c this is probably a more "TeX" then "R" question. I've been using "latex" function in my .Rnw file to generate tables, but I've always been using it without assigning the result to a object, i.e. x <- matrix(1:6, nrow=2, dimnames=list(c('a','b'),c('c','d','this that'))

Re: [R] difference along a vector

2010-05-12 Thread Erik Iverson
help.search("difference") would lead you to ?diff, see the lag argument Clark Johnston wrote: I was looking for a function which would take the difference along a vector? a<-c(1,12,23,44,15,28,7,8,9,10) if I set the number difference to 3 would return 43 2 5 -37 -7 -19 3 or do I need to wr

Re: [R] function

2010-05-12 Thread David Winsemius
On May 12, 2010, at 2:50 PM, Daniel Malter wrote: Fair enough, my mistake. However, I am quite fascinated how that focuses everybody else on picking on the intitial answer and diverts everybody away from anwering the actual question. All the more it points to the second paragraph of my r

Re: [R] difference along a vector

2010-05-12 Thread Peter Ehlers
?diff and look at argument 'lag'. On 2010-05-12 13:06, Clark Johnston wrote: I was looking for a function which would take the difference along a vector? a<-c(1,12,23,44,15,28,7,8,9,10) if I set the number difference to 3 would return 43 2 5 -37 -7 -19 3 or do I need to write my own functio

[R] manipulating a matrix

2010-05-12 Thread Clark Johnston
Is there a way to create a new matrix from and existing matrix with A [,1] [,2] [1,] 113 [2.] 218 [3,] 314 [4,] 420 if(A[,2] > 15) B [,1] [,2] [1,] 2 18 [2,] 4 20 -- View this message in context:

Re: [R] Changing R opening message

2010-05-12 Thread Marc Schwartz
On May 12, 2010, at 12:29 PM, gvrocha wrote: > > Hi, > > I am using some python code to execute small R code snippets. > I would like to save the messages output to the screen when R is executed. > However, I will just save the opening message a zillion times since many > thousands of little

Re: [R] Changing R opening message

2010-05-12 Thread Henrique Dallazuanna
Start R with "-q". On Wed, May 12, 2010 at 2:29 PM, gvrocha wrote: > > Hi, > > I am using some python code to execute small R code snippets. > I would like to save the messages output to the screen when R is executed. > However, I will just save the opening message a zillion times since many

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-12 Thread Peter Ehlers
On 2010-05-12 10:51, Robert Baer wrote: - Original Message - Fantastic! It would be great if the description could be modified to include the mysterious bit about the upper and lower bound whisker positions: upper whisker = min(max(x), Q_3 + 1.5 * IQR) lower whisker = max(min(x), Q_1 -

[R] difference along a vector

2010-05-12 Thread Clark Johnston
I was looking for a function which would take the difference along a vector? >a<-c(1,12,23,44,15,28,7,8,9,10) if I set the number difference to 3 would return 43 2 5 -37 -7 -19 3 or do I need to write my own function for this. -- View this message in context: http://r.789695.n4.nabble.com/diff

Re: [R] function

2010-05-12 Thread Henrique Dallazuanna
Try this: lapply(bb, function(x)quantile(x, c(0.25, 0.75)) - matrix(IQR(x) * c(1.5, 3), nrow = 2) %*% c(-1, 1)) On Wed, May 12, 2010 at 1:44 PM, n.via...@libero.it wrote: > > Dear list, > I'm trying to implement the following function, but what I get is an error > message and I don't understand

[R] Changing R opening message

2010-05-12 Thread gvrocha
Hi, I am using some python code to execute small R code snippets. I would like to save the messages output to the screen when R is executed. However, I will just save the opening message a zillion times since many thousands of little snippets will be executed. Does anyone how to om

Re: [R] snow makeCluster (makeSOCKcluster) not working in R-2.11

2010-05-12 Thread Ramon Diaz-Uriarte
Interesting: I run into the same problem (also R-2.11) when using Windows inside VirtualBox from a Debian host (i.e., I am running a Debian GNU/Linux box that has VirtualBox, and I have a Windows XP as a guest inside VirtualBox). But I attributed it to my setup (usage of VirtualBox) as I was told t

[R] RSQLite equivalent of .schema?

2010-05-12 Thread Jonathan Greenberg
Rhelpers: (Thanks for the previous help with getting a "where" statement working). Now on to my next question -- our database guru has asked me to run ".schema" on an sqlite database, and I was wondering if there is an equivalent in R to do this? Thanks! --j ___

[R] how to make monthly time series out of daily

2010-05-12 Thread Reto Baumgartner
I am using the Rmetrics package and would like to convert a daily price time serie into a monthly one. In SPlus I could use: aggregateSeries(timeSerie, by="months",FUN=first). __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-h

Re: [R] R 2.11 on redhat el5/x86_64?

2010-05-12 Thread Marc Schwartz
On May 12, 2010, at 1:20 PM, Dick Beyer wrote: > Hi, > > Will compiled R 2.11 be made available for redhat el5/x86_64 soon? The > download link: > > http://cran.fhcrc.org/bin/linux/redhat/el5/x86_64/ > > is still at R 2.10.0. > > Thanks much, > Dick Not clear on when Martyn et al might mak

Re: [R] function

2010-05-12 Thread Daniel Malter
Fair enough, my mistake. However, I am quite fascinated how that focuses everybody else on picking on the intitial answer and diverts everybody away from anwering the actual question. All the more it points to the second paragraph of my reply, namely that all modular components of the function sho

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-12 Thread Dennis Murphy
Hi: Point well taken, Robert. This is a good example of the difference between how something is defined mathematically as opposed to how it is applied computationally. Thank you for the clarification. Regards, Dennis On Wed, May 12, 2010 at 9:51 AM, Robert Baer wrote: > > - Original Messag

Re: [R] Splines under tension

2010-05-12 Thread David Winsemius
On May 12, 2010, at 2:37 PM, Greg Snow wrote: I think this last line is a fortune candidate: It's not just that different disciplines rediscover the same ideas, they also relabel them. With apologies to Aretha: I second that emotion. -- David. -- Gregory (Greg) L. Snow Ph.D. Statisti

Re: [R] Data Mining Survey

2010-05-12 Thread Muenchen, Robert A (Bob)
OK, here's a link specific to R-Help readers: http://rexeranalytics.com/Data-Miner-Survey-2010-Intro2.html And you can tell people to use this access code: MD21C9 Cheers, Bob >-Original Message- >From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] >On Behalf Of M

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Duncan Murdoch
On 12/05/2010 2:29 PM, Erich Studerus wrote: Thank you! I edited the Sweave.sh file and it works now for reading data stored as R data files, but the read.xls function from the gdata-package does no longer work. options('encoding'='UTF-8') require(gdata) read.xls("http://www.schwerhoerigkeit.p

Re: [R] Splines under tension

2010-05-12 Thread Greg Snow
I think this last line is a fortune candidate: It's not just that different disciplines rediscover the same ideas, they also relabel them. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-

Re: [R] Reading R code help--Beginner

2010-05-12 Thread Erik Iverson
Hi, I am brand new to R and not familiar with the language, though I have been reading the manuals and making some slow going progress. I am working with some source code from a Global Vector Auto -Regressive program written by Ranier Puhr from the R-forge group. I need help interpreting the

Re: [R] Reading R code help--Beginner

2010-05-12 Thread Steve Lianoglou
Hi, On Wed, May 12, 2010 at 12:11 PM, Makada Henry wrote: > > Hi, I am brand new to R and not familiar with the language, though I > have been reading the manuals and making some slow going progress. I am > working with some source code from a Global Vector Auto -Regressive > program written by R

[R] R 2.11 on redhat el5/x86_64?

2010-05-12 Thread Dick Beyer
Hi, Will compiled R 2.11 be made available for redhat el5/x86_64 soon? The download link: http://cran.fhcrc.org/bin/linux/redhat/el5/x86_64/ is still at R 2.10.0. Thanks much, Dick *** Richard P. Beyer, Ph.D. Universi

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Erich Studerus
Thank you! I edited the Sweave.sh file and it works now for reading data stored as R data files, but the read.xls function from the gdata-package does no longer work. options('encoding'='UTF-8') require(gdata) read.xls("http://www.schwerhoerigkeit.pop.ch/hoergeraete_test.xls";, stringsAsFactor

Re: [R] Boxplot position on X-axis relative to it's value

2010-05-12 Thread Henrique Dallazuanna
One option could be: # Using Richard's example boxplot(nmgml ~ factor(day, levels = do.call(seq, as.list(range(girafe$day, data = girafe, xaxt = 'n') axis(1, at = unique(girafe$day)) On Wed, May 12, 2010 at 10:30 AM, Mächler Marc Jaques wrote: > Dear R-Experts. > > I collected diffe

  1   2   >