Re: [R] R badly lags matlab on performance?

2009-01-04 Thread Philippe Grosjean
I wrote once the benchmark mentioned in Stefan's post (based on initial work by Stephan Steinhaus), and it is still available for those who would like to update it. Note that it is lacking some checking of the results to make sure that calculation is not only faster, but correct! Now, I'll

[R] Customized LDA (MASS) object plot

2009-01-04 Thread Rodrigo Aluizio
Hi R experts. I performed an Linear Discriminant Analysis (lda) and now I want to plot the first two axes (LDA1 and LDA2). Well MASS package have the plot.lda and pairs.lda to do that. But, they don’t let me personalize them, once they don’t accept the type=’n’ plot. So I start looking at the lda

Re: [R] extend summary.lm for hccm?

2009-01-04 Thread Achim Voß
Dear John (and other readers of this mailing list), thanks for your help. It now raises two further questions, one directly related to R and probably easy to answer, the other one a little off-topic. John Fox wrote: ... (BTW, one would not normally call summary.lm() directly, but rather use

[R] Combining greek letters with the contents of variables

2009-01-04 Thread Ingeborg Schmidt
Dear r-help list, I am trying to combine a greek letter lambda with the contents of a variable v in the title of a plot. However, it seems that having v inside the expression() function causes it not to be evaluated, on the other hand having expression(lambda) inside something else like paste

[R] Problems with Rcmdr and BiodiversityR

2009-01-04 Thread Frieda
Dear all, I run R 2.7.2 under Windows and integrated BiodiversityR sucessfully into the R commander. Most functions of BiodiversityR run but others (like analysis of species as response) produce blank windows and the message: Error in get(x, envir = RcmdrEnv(), mode = mode, inherits = FALSE) :

Re: [R] Combining greek letters with the contents of variables

2009-01-04 Thread Uwe Ligges
I feel this becomes a frequently asked question, hence I tried Google and typed R main expression greek --- and got an answer: https://stat.ethz.ch/pipermail/r-help/2006-July/109934.html Uwe Ligges Ingeborg Schmidt wrote: Dear r-help list, I am trying to combine a greek letter lambda with

Re: [R] Problems with Rcmdr and BiodiversityR

2009-01-04 Thread John Fox
Dear Frieda, I'm afraid that it's not possible to tell from the information that you've given what the source of the problem is. What version of Rcmdr are you using? Have you written an Rcmdr plug-in package for BiodiversityR? Where in your code is this error produced? Etc. My guess is that

Re: [R] Combining greek letters with the contents of variables

2009-01-04 Thread Gabor Grothendieck
The paste in that answer could be eliminated using ~ : plot(1:10, main= bquote(Results for ~ pi == .(pi))) On Sun, Jan 4, 2009 at 11:17 AM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: I feel this becomes a frequently asked question, hence I tried Google and typed R main expression greek

[R] Lattice xyplot help please.

2009-01-04 Thread Haoda Fu
Hi - I am not R expert and I would appreciate your time if you can help me about my xyplot question. I would like to add text (p-value) in a 4 panels xyplot. I thought panel = function{} should work but I am not sure where I did it wrong. The error message from the following code is Argument

Re: [R] Problems with Rcmdr and BiodiversityR

2009-01-04 Thread John Fox
Dear Frieda, I'm afraid that I completely misunderstood your question. I was unfamiliar with the BiodiversityR package and thought that you were writing an Rcmdr plug-in for it. Actually, I see that BiodiversityR uses the Rcmdr interface, but isn't written as a standard plug-in. Instead, it

Re: [R] Newbie question

2009-01-04 Thread Daniel Malter
Hi, get yourself one of the many free manuals that you can download online. They answer the easier questions. Tom Short's R reference card may also be very helpful to have on the side when you are an R novice. Cheers, Daniel - cuncta stricte discussurus

[R] RES: Customized LDA (MASS) object plot

2009-01-04 Thread Rodrigo Aluizio
Thanks for the enlightenment Prof. Ripley. I guess I've to start learning quite more about panel function. Once I'm pointed to the right way I'll probably be able to do what I want. Sorry for the mistake, I totally misses the panel function possibilities. Rodrigo. -Mensagem original- De:

Re: [R] Customized LDA (MASS) object plot

2009-01-04 Thread Prof Brian Ripley
Hmm: what do you want to do that a customized panel function cannot do? plot.lda does not accept type=n precisely because it does support a panel function to plot within the axes it has set up. Your claim that 'they don?t let me personalize them' is simply untrue. If you want to see the

[R] R badly lags matlab on performance? -- Define performance, please.

2009-01-04 Thread Bert Gunter
Folks: Merely my opinions, of course ... Just to amplify a little on Philippe's remarks by paraphrasing comments made many times on this list before. In a galaxy far away a long time ago ... John Chambers and his Bell Labs colleagues -- and subsequently RR (Ross Ihaka and Robert Gentleman) and

Re: [R] Problem with package SNOW on MacOS X 10.5.5

2009-01-04 Thread luke
I don't see this on my setup (OS X 10.5.6, R 2.8.0, snow 0.3-3). As snow does not use a name space it is possible that something else you have loaded is masking a snow internal function. Another possibility might be that your worker processes are picking up different versions of R or snow. You

Re: [R] R badly lags matlab on performance?

2009-01-04 Thread Stavros Macrakis
On Sat, Jan 3, 2009 at 7:02 PM, l...@stat.uiowa.edu wrote: R's interpreter is fairly slow due in large part to the allocation of argument lists and the cost of lookups of variables, including ones like [- that are assembled and looked up as strings on every call. Wow, I had no idea the

[R] Error could not find function

2009-01-04 Thread babelproofreader
I have copied a very simple function but when I try to call it I get an error message could not find function. The function file is named addthree.r and I cd to the directory where the function is saved before calling it. What am I doing wrong? -- View this message in context:

Re: [R] Newbie question

2009-01-04 Thread Don MacQueen
Also, subset( abntest, abntesr 90 ) -Don At 8:55 PM -0700 1/3/09, greggal...@gmail.com wrote: Hi: I'm loading in students test scores with: abntest - read.table(scores.txt) if I type: abntest I get ALL the values. I want to be able to filter it by various things such as: if(

Re: [R] Error could not find function

2009-01-04 Thread Philipp Pagel
I have copied a very simple function but when I try to call it I get an error message could not find function. The function file is named addthree.r and I cd to the directory where the function is saved before calling it. What am I doing wrong? R does not look for funcitons to execute in

Re: [R] R badly lags matlab on performance?

2009-01-04 Thread luke
On Sun, 4 Jan 2009, Stavros Macrakis wrote: On Sat, Jan 3, 2009 at 7:02 PM, l...@stat.uiowa.edu wrote: R's interpreter is fairly slow due in large part to the allocation of argument lists and the cost of lookups of variables, including ones like [- that are assembled and looked up as strings

[R] Bivarite Weibull Distribution

2009-01-04 Thread saboorhangu
HI Every one Could some one provide me definitions of following bivariate distributions gamma, exponencial, Weibull, half-normal , Rayleigh, Erlang,chi-square thanks A.S. Qureshi __ R-help@r-project.org mailing list

Re: [R] R badly lags matlab on performance?

2009-01-04 Thread Peter Dalgaard
Stavros Macrakis wrote: On Sat, Jan 3, 2009 at 7:02 PM, l...@stat.uiowa.edu wrote: R's interpreter is fairly slow due in large part to the allocation of argument lists and the cost of lookups of variables, including ones like [- that are assembled and looked up as strings on every call. Wow,

[R] ratetable creation

2009-01-04 Thread Daniel Rabczenko
Dear All, Can anyone can help me in creation ratetable object assuming, that I have mortality rates organized in standard way by year, gender and age (0-99). I would be very grateful for any help. Best regards, Daniel Rabczenko [[alternative HTML version deleted]]

Re: [R] how specify lme() with multiple within-subject factors?

2009-01-04 Thread ONKELINX, Thierry
Dear Ben, I'm cc'ing R-sig-mixed-models because that's a more appropriate list for questions on lme(). Lme() is only able to work with nested random effects, not with crossed random effects. Therefore you would need lmer() from the lme4 package. But I don't think you need crossed random effects.

Re: [R] how specify lme() with multiple within-subject factors?

2009-01-04 Thread Bert Gunter
Folks: Lme() is only able to work with nested random effects, not with crossed random effects. Not quite true. Crossed models **can** be done, albeit clumsily, via pdMatrix objects: the Bates/Pinheiro book even contains an example or two (one on assay plates, I recall, but I don't have my

Re: [R] R badly lags matlab on performance?

2009-01-04 Thread Stavros Macrakis
On Sun, Jan 4, 2009 at 4:50 PM, l...@stat.uiowa.edu wrote: On Sun, 4 Jan 2009, Stavros Macrakis wrote: On Sat, Jan 3, 2009 at 7:02 PM, l...@stat.uiowa.edu wrote: R's interpreter is fairly slow due in large part to the allocation of argument lists and the cost of lookups of variables, I'd

Re: [R] R badly lags matlab on performance?

2009-01-04 Thread Stavros Macrakis
Thanks for the explanations of the internals. I understand about the 'redefining log' problem in the interpreter, but I wasn't aware of the NAMED counter. In both cases, beyond static analysis, dynamic Java compilers do a pretty good job, but I don't know if Java bytecodes are suitable for R,

[R] How to extract range of colums in a data frame

2009-01-04 Thread Gundala Viswanath
Dear all, I have the following data frame: dat V1 V2 V3 V4V5 V6 V7 V8 V9 1 1 CACCCA 9.0 18 12.00 18.0 15.0 12.0 6.0 2 1 ACGATACGGCGACCACCGAGATCTACACTCTTCC 18.0 8 12.00 18.0 15.0 12.0 18.0 3 1

Re: [R] How to extract range of colums in a data frame

2009-01-04 Thread Jorge Ivan Velez
Dear Gundala, Try this: ex-paste(V,3:9,sep=) new.dat-dat[,ex] new.dat HTH, Jorge On Sun, Jan 4, 2009 at 9:36 PM, Gundala Viswanath gunda...@gmail.comwrote: Dear all, I have the following data frame: dat V1 V2 V3 V4V5 V6 V7 V8 V9 1

Re: [R] How to extract range of colums in a data frame

2009-01-04 Thread stephen sefick
x - dat[,3:9] # I think this is what you want. On Sun, Jan 4, 2009 at 9:42 PM, Jorge Ivan Velez jorgeivanve...@gmail.com wrote: Dear Gundala, Try this: ex-paste(V,3:9,sep=) new.dat-dat[,ex] new.dat HTH, Jorge On Sun, Jan 4, 2009 at 9:36 PM, Gundala Viswanath gunda...@gmail.comwrote:

Re: [R] How to extract range of colums in a data frame

2009-01-04 Thread Marc Schwartz
Or this: new.DF - subset(dat, select = V3:V9) str(new.DF) 'data.frame': 16 obs. of 7 variables: $ V3: num 9 18 15 15 21 21 12 15 21 19.5 ... $ V4: int 18 8 8 6 21 21 21 9 21 18 ... $ V5: num 12 12 12 18 21 ... $ V6: num 18 18 12 6 21 21 21 18 21 19.5 ... $ V7: num 15 15 18 18 21 21

Re: [R] Bivarite Weibull Distribution

2009-01-04 Thread G. Jay Kerns
Dear A.S. Qureshi, On Sun, Jan 4, 2009 at 11:36 AM, saboorha...@gmail.com wrote: HI Every one Could some one provide me definitions of following bivariate distributions gamma, exponencial, Weibull, half-normal , Rayleigh, Erlang,chi-square See Johnson, Kotz, and Balakrishnan (2000) for a

Re: [R] the first and last observation for each subject

2009-01-04 Thread William Dunlap
[R] the first and last observation for each subject hadley wickham h.wickham at gmail.com Fri Jan 2 14:52:42 CET 2009 On Fri, Jan 2, 2009 at 3:20 AM, gallon li gallon.li at gmail.com wrote: I have the following data ID x y time 1 10 20 0 1 10 30 1 1 10 40 2 2 12 23 0 2 12

[R] Process File Line By Line Without Slurping into Object

2009-01-04 Thread Gundala Viswanath
Dear all, In general practice one would slurp the whole file using this method before processing the data: dat - read.table(filename) or variations of it. Is there a way we can access the file line by line without slurping/storing them into object? I am thinking something like this in Perl:

[R] getResponse(model.lme) yields incorrect number of dimensions error

2009-01-04 Thread Ullrich Ecker
Dear R experts, I would like to get an R^2 - like value for a multilevel regression using lme. I followed an archived suggestion by José Pinheiro to use the squared correlation between fitted and observed values, i.e., (cor(fitted(model.lme), getResponse(model.lme))^2 but getResponse returns

[R] eval using a environment X but resultsin .GlobalEnv

2009-01-04 Thread Saptarshi Guha
Hello, Suppose I have an expression, E, which accesses some variables present in an environment V. I do this via eval(E,envir=V) however all assignments end up in V. I would like the results of assignments in E to end up in the .GlobalEnv ? Or at least the calling environment. Is there a quick way

Re: [R] eval using a environment X but resultsin .GlobalEnv

2009-01-04 Thread Gabor Grothendieck
Try this: .GlobalEnv$x - 3 Also x - 3 will work if there is no x between V and the global environment but if there is then that one will get set rather than the one in the global environment. On Mon, Jan 5, 2009 at 1:52 AM, Saptarshi Guha saptarshi.g...@gmail.com wrote: Hello, Suppose I