Re: [R] Problem of running R console from Java on linux box

2008-11-01 Thread ZhaoWei
Great, "--vanilla" works! Can you please tell me what this parameter means? And, it works with the execuatble(/usr/lib/R/bin/exec/R). I'm wondering is it possible to do the same with the shell script(/usr/bin/R), anyway when you type "R" in command line, it means the shell script. Thanks again! >

Re: [R] A question about pairs()

2008-11-01 Thread Felix Andrews
Ian, pairs() is (normally) a base graphics function, *not* a trellis graphics function. You can not easily mix the two graphics systems. So you can not use panel.number(), panel.smooth(), etc with pairs. There is a trellis graphics equivalent to pairs, called splom (in the lattice package). I do

Re: [R] odd behaviour of identical

2008-11-01 Thread Berwin A Turlach
On Sat, 01 Nov 2008 22:57:38 +0100 Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > Patrick Burns wrote: > > Wacek Kusnierczyk wrote: > >> smells bad design. > >> > > > > Nonsense. > > not really, i'm afraid. > [...] > to the point: > > is.integer(1) # FALSE > is.integer(1:1) # TRUE > > is no

Re: [R] Hidden line algorithms and a different kind of waterfall

2008-11-01 Thread stephen sefick
what is being represented here that is not on a regular spectrogram? I am not being crass I can't figure out what I am looking at. Maybe a contour plot- wouldn't be in 3d but would represent the same information. I am envisioning something like a wavelet time scale diagram... Just a thought. O

Re: [R] calculation for standard normal cumulative distribution

2008-11-01 Thread Charles C. Berry
That's too easy. The posting guide is your friend. Especially the part about using help as in help('normal') which would reply: No documentation for 'normal' in specified packages and libraries: you could try '??normal' And indeed you could, which leads rather quickl

[R] function for standard normal cumulative distribution

2008-11-01 Thread sandsky
Is there anyone knowing a function for standard normal cumulative distribution? Φ(z=-0.1)=? also Φ(z=?)=0.025 -- View this message in context: http://www.nabble.com/function-for-standard-normal-cumulative-distribution-tp20282804p20282804.html Sent from the R help mailing list archive at Nabble.

Re: [R] how to iterate through a list using ls

2008-11-01 Thread Gabor Grothendieck
Its a FAQ: http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-turn-a-string-into-a-variable_003f On Sat, Nov 1, 2008 at 7:54 PM, Lo, Ken <[EMAIL PROTECTED]> wrote: > Hi all, > > I know this is an idiotic question, but I am trying to iterate through a > list of data.frame using ls (I have name

Re: [R] how to iterate through a list using ls

2008-11-01 Thread Erik Iverson
See ?get However, it sounds like you might look at storing your data.frames in an object of class "list". Then you can do things like: alist <- list(df1 = data.frame(a = 1:10, b = 2:11), df2 = data.frame(a = 2:100, b = 3:101)) lapply(alist, summary) If you wrote your own function to do t

Re: [R] how to iterate through a list using ls

2008-11-01 Thread Sarah Goslee
See ?get And you'll probably also want ?assign On Sat, Nov 1, 2008 at 7:54 PM, Lo, Ken <[EMAIL PROTECTED]> wrote: > Hi all, > > I know this is an idiotic question, but I am trying to iterate through a > list of data.frame using ls (I have named the data frames in a way that > lets me subset them w

[R] how to iterate through a list using ls

2008-11-01 Thread Lo, Ken
Hi all, I know this is an idiotic question, but I am trying to iterate through a list of data.frame using ls (I have named the data frames in a way that lets me subset them with ls(pattern="test", for example). But ls returns a character vector. How to I refer to the data frames by their names i

[R] Hidden line algorithms and a different kind of waterfall

2008-11-01 Thread Carl Witthoft
This is not the same as the recent thread on a waterfall graph. I'm thinking about the rolling FFT display used in acoustics and other spectrum analysis tasks. Here's an example of a very fancy 3-D waterfall display: http://www.ultimaserial.com/UltimaWaterfall.html I was just wondering if th

Re: [R] odd behaviour of identical

2008-11-01 Thread Wacek Kusnierczyk
Patrick Burns wrote: > Wacek Kusnierczyk wrote: >> smells bad design. >> > > Nonsense. not really, i'm afraid. > One of the key design features of R is that it > hides implementation details from users. They > are free to think about the substantive issues with > their data rather than worryi

Re: [R] How R calculate p-value ?

2008-11-01 Thread Ted Harding
On 01-Nov-08 20:59:29, RON70 wrote: > Still no reply. Is my question not understandable at all? > RON70 wrote: >> I am wondering how R calculate p-value for a test. Does R do some >> "Approximate" integration on the p.d.f of null distribution? >> How I can see the code for this particular calculati

Re: [R] Loglogistic distribution

2008-11-01 Thread Göran Broström
On Thu, Oct 30, 2008 at 11:14 AM, <[EMAIL PROTECTED]> wrote: > Dear all, > > Does anyone knows the expression for the cumulative distribution of the > loglogistic distribution used in survreg? (I.e. how are the results related > to the cumulative distribution?) I bet that Terry Therneau and Thoma

Re: [R] How R calculate p-value ?

2008-11-01 Thread Göran Broström
On Sat, Nov 1, 2008 at 9:59 PM, RON70 <[EMAIL PROTECTED]> wrote: > > Still no reply. Is my question not understandable at all? Patience! 14 minutes in the middle of the night, and a big holiday! Yes, your question is understandable, although too general to generate any useful reply. One attemt is:

Re: [R] How R calculate p-value ?

2008-11-01 Thread RON70
Still no reply. Is my question not understandable at all? RON70 wrote: > > I am wondering how R calculate p-value for a test. Does R do some > "Approximate" integration on the p.d.f of null distribution? How I can see > the code for this particular calculation? > > Your help will be highly app

Re: [R] Fitting weibull and exponential distributions to left censoring data

2008-11-01 Thread Göran Broström
On Fri, Oct 31, 2008 at 2:27 PM, Terry Therneau <[EMAIL PROTECTED]> wrote: > Use the survreg function. The survreg function cannot fit left censored data (correct me if I am wrong!), neither can phreg or aftreg (package eha). On the other hand, if Borja instead wanted to fit left truncated data (

Re: [R] writeMat error

2008-11-01 Thread Henrik Bengtsson
Hi, a follow up on this as well: I've fixed the below bug in writeMat(). R.matlab v1.2.4 is now available on CRAN. Please update. Henrik On Wed, Oct 1, 2008 at 12:55 PM, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > Hi. > > On Sat, Sep 27, 2008 at 5:17 AM, Steele, Dr Douglas <[EMAIL PROTECTED

Re: [R] Saving a 3d array into a matlab file

2008-11-01 Thread Henrik Bengtsson
Hi, a follow up on this: I've fixed the below bug in writeMat(). R.matlab v1.2.4 is now available on CRAN. Please update. Henrik On Tue, Oct 28, 2008 at 3:30 PM, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > Hi, > > On Tue, Oct 28, 2008 at 2:25 PM, Minho Chae <[EMAIL PROTECTED]> wrote: >> Dear

[R] Changing colors and symbols in lattice

2008-11-01 Thread John Poulsen
Hello, I have made a plot using xYplot, but am having trouble with some final touching up details. I would appreciate your help... The below code results in a plot of 4 species, with the species being the same color. So, the first three points are blue, the second three are purple, etc...

Re: [R] lapply item names

2008-11-01 Thread Chibisi Chima-Okereke
Fantabulous, Thanks On Sat, Nov 1, 2008 at 3:43 PM, jim holtman <[EMAIL PROTECTED]> wrote: > lapply(names(dataSet), function(.name) plotFunction(dataSet[[.name]], > main=.name)) > > On Sat, Nov 1, 2008 at 10:31 AM, Chibisi Chima-Okereke <[EMAIL PROTECTED]> > wrote: > > Dear all, > > > > I am usi

Re: [R] Time-travelling laptop, or problem with system.time?

2008-11-01 Thread Uwe Ligges
Rense wrote: Playing around with my new laptop (Macbook, 2.4Ghz), I encountered unexplained timings using system.time. I did the following: X <- Matrix(rnorm(1e6), 1000) system.time(for(i in 1:25) X%*%X) user system elapsed 8.306 0.591 5.031 system.time(for(i in 1:25) solve(X)) user syste

Re: [R] Is there a way to vectorize this? [with correction]

2008-11-01 Thread Gabor Grothendieck
Here is a function that has arguments similar to gsub. The first is the pattern where the portion to actually be replaced should be in parentheses and the others are the replacement string and the text: library(gsubfn) replace.in.context <- function(pattern, replacement, x, ...) { gsubfn(

Re: [R] Westfall-Young procedure

2008-11-01 Thread David Winsemius
The citation below indicates the authors used the permax package (yet another Gentleman authored effort) to implement the free step-down method of W&Y: Generalized Rank Tests for Replicated Microarray Data: Mei-Ling Ting Lee, Robert J. Gray, Harry Björkbacka, Mason W. Freeman http://www.bep

Re: [R] Help needed with Waterfall plot

2008-11-01 Thread David Winsemius
On Nov 1, 2008, at 10:32 AM, hadley wickham wrote: On Fri, Oct 31, 2008 at 11:25 AM, Philip Twumasi-Ankrah <[EMAIL PROTECTED]> wrote: Hi friends, I need suggestions/directions on how to producing a waterfall plot for present extend of change in tumour size for a set of respondents in a stu

Re: [R] Is there a way to vectorize this? [with correction]

2008-11-01 Thread Duncan Temple Lang
Nutter, Benjamin wrote: ** Sorry to repost. I forgot to include a function necessary to make the example work ** I apologize up front for this being a little long. I hope it's understandable. Please let me know if I need to clarify anything. Several months ago I wrote a series of functions

Re: [R] lapply item names

2008-11-01 Thread jim holtman
lapply(names(dataSet), function(.name) plotFunction(dataSet[[.name]], main=.name)) On Sat, Nov 1, 2008 at 10:31 AM, Chibisi Chima-Okereke <[EMAIL PROTECTED]> wrote: > Dear all, > > I am using lapply to generate plots by applying a plot function to a list of > dataframes. e.g. > > lapply(dataSet,

Re: [R] Help needed with Waterfall plot

2008-11-01 Thread Gabor Grothendieck
On Sat, Nov 1, 2008 at 10:32 AM, hadley wickham <[EMAIL PROTECTED]> wrote: > On Fri, Oct 31, 2008 at 11:25 AM, Philip Twumasi-Ankrah > <[EMAIL PROTECTED]> wrote: >> Hi friends, >> I need suggestions/directions on how to producing a waterfall plot for >> present extend of change in tumour size for

Re: [R] Help needed with Waterfall plot

2008-11-01 Thread hadley wickham
On Fri, Oct 31, 2008 at 11:25 AM, Philip Twumasi-Ankrah <[EMAIL PROTECTED]> wrote: > Hi friends, > I need suggestions/directions on how to producing a waterfall plot for > present extend of change in tumour size for a set of respondents in a study. > Example of use of waterfall plot is in the fo

[R] lapply item names

2008-11-01 Thread Chibisi Chima-Okereke
Dear all, I am using lapply to generate plots by applying a plot function to a list of dataframes. e.g. lapply(dataSet, FUN = plotFunction) Is there a way to call the list item number inside the plot function so that I can identify each graph? Thanks Chibisi [[alternative HTML version

[R] Westfall-Young procedure

2008-11-01 Thread Leif Peterson
Is there a Westfall-Yound algorithm available with which I can test correlation, 2- and k-sample tests of association? Thanks, LP __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http:/

Re: [R] Splitting device for ggplots?

2008-11-01 Thread hadley wickham
On Sat, Nov 1, 2008 at 5:13 AM, baptiste auguie <[EMAIL PROTECTED]> wrote: > Hi, > > I believe you can apply the same procedure as described in Paul Murrell's "R > graphics" book for arranging lattice plots. Yup, and see also http://had.co.nz/ggplot2/book/grid.pdf Hadley -- http://had.co.nz/

Re: [R] count data with some conditions

2008-11-01 Thread David Winsemius
On Nov 1, 2008, at 3:30 AM, (Ted Harding) wrote: On 01-Nov-08 02:51:37, David Winsemius wrote: Do you want the count of remaining elements which are strictly greater than the first element? length(which(a[1] < a[2:10])) [1] 4 or perhaps a bit more deviously: sum( a[1] [1] 4 No need to

[R] sampling from Laplace-Normal

2008-11-01 Thread Armin Meier
Hi, I have to draw samples from an asymmetric-Laplace-Normal distribution: f(u|y, x, beta, phi, sigma, tau) \propto exp( - sum( ( abs(lo) + (2*tau-1)*lo )/(2*sigma) ) - 0.5/phi*u^2), where lo = (y - x*beta) and y=(y_1, ..., y_n), x=(x_1, ..., x_n) -- sorry for this huge formula -- A WinBUGS Gibbs s

[R] Time-travelling laptop, or problem with system.time?

2008-11-01 Thread Rense
Playing around with my new laptop (Macbook, 2.4Ghz), I encountered unexplained timings using system.time. I did the following: > X <- Matrix(rnorm(1e6), 1000) > system.time(for(i in 1:25) X%*%X) user system elapsed 8.306 0.591 5.031 > system.time(for(i in 1:25) solve(X)) user system elapsed 8.93

Re: [R] Help needed with Waterfall plot

2008-11-01 Thread Gabor Grothendieck
Here is one possibility: # random data set.seed(1) growth <- sort(runif(215, -100, 100), decreasing = TRUE) col <- factor(1 + (growth < -25) + (growth < 25), lab = c("black", "grey50", "grey80")) barplot(growth, col = levels(col)[col], ylab = "% Growth", main = "Random Data", xla

[R] sampling from Laplace-Normal

2008-11-01 Thread Armin Meier
Hi, I have to draw samples from an asymmetric-Laplace-Normal distribution: f(u|y, x, beta, phi, sigma, tau) \propto exp( - sum( ( abs(lo) + (2*tau-1)*lo )/(2*sigma) ) - 0.5/phi*u^2), where lo = (y - x*beta) and y=(y_1, ..., y_n), x=(x_1, ..., x_n) -- sorry for this huge formula -- A WinBUGS Gibbs s

Re: [R] Help needed with Waterfall plot

2008-11-01 Thread Jim Lemon
Thomas Petzoldt wrote: Philip Twumasi-Ankrah schrieb: Hi friends, I need suggestions/directions on how to producing a waterfall plot for present extend of change in tumour size for a set of respondents in a study. Example of use of waterfall plot is in the following slides presented at ASCO

Re: [R] "Goto" loop

2008-11-01 Thread Peter Dalgaard
Patrick Burns wrote: Peter Dalgaard wrote: megh wrote: Is there anything like "goto" loop, which exists in most computer programs? e.g. I am looking for this kind of stuff : if(i < 6) goto "step-02" Any idea? Regards, It doesn't exist, but it can always be replaced by if() {} else

Re: [R] Help needed with Waterfall plot

2008-11-01 Thread Jim Lemon
Philip Twumasi-Ankrah wrote: Hi friends, I need suggestions/directions on how to producing a waterfall plot for present extend of change in tumour size for a set of respondents in a study. Example of use of waterfall plot is in the following slides presented at ASCO 2007 by Axel Grothey. Hi Ph

Re: [R] "Goto" loop

2008-11-01 Thread Wacek Kusnierczyk
Patrick Burns wrote: > Peter Dalgaard wrote: >> megh wrote: >> >>> Is there anything like "goto" loop, which exists in most computer >>> programs? >>> e.g. I am looking for this kind of stuff : >>> >>> if(i < 6) goto "step-02" >>> >>> Any idea? >>> >>> Regards, >>> >> >> It doesn't exist, bu

Re: [R] Splitting device for ggplots?

2008-11-01 Thread baptiste auguie
Hi, I believe you can apply the same procedure as described in Paul Murrell's "R graphics" book for arranging lattice plots. library(grid) library(ggplot2) ?grid.layout df <- data.frame(x=rnorm(100), y=rnorm(100)) df2 <- data.frame(x <- rnorm(100), y=runif(x)) p <- qplot(x,y, data=df) p2 <

Re: [R] "Goto" loop

2008-11-01 Thread Patrick Burns
Peter Dalgaard wrote: megh wrote: Is there anything like "goto" loop, which exists in most computer programs? e.g. I am looking for this kind of stuff : if(i < 6) goto "step-02" Any idea? Regards, It doesn't exist, but it can always be replaced by if() {} else {} constructs. (You do

[R] Splitting device for ggplots?

2008-11-01 Thread Vitalie Spinu
Dear UseRs, For various reasons I need to plot multiple ggplots on one device (preferably pdf). Is there a way to achieve that? par(mfrow), split.screen() and layout() seem not to do the job. Thanks, Vitalie. __ R-help@r-project.org mailing list ht

Re: [R] count data with some conditions

2008-11-01 Thread sandsky
David, Yes, it is what I want. It is a great help. Thank you, Jin David Winsemius wrote: > > Do you want the count of remaining elements which are strictly > greater than the first element? > > > length(which(a[1] < a[2:10])) > [1] 4 > > or perhaps a bit more deviously: > > > sum( a[1

Re: [R] count data with some conditions

2008-11-01 Thread Ted Harding
On 01-Nov-08 02:51:37, David Winsemius wrote: > Do you want the count of remaining elements which are strictly > greater than the first element? > > > length(which(a[1] < a[2:10])) > [1] 4 > > or perhaps a bit more deviously: > > > sum( a[1] [1] 4 No need to be devious! Simply sum(a[1] <

[R] How R calculate p-value ?

2008-11-01 Thread RON70
I am wondering how R calculate p-value for a test. Does R do some "Approximate" integration on the p.d.f of null distribution? How I can see the code for this particular calculation? Your help will be highly appreciated. Regards, -- View this message in context: http://www.nabble.com/How-R-cal