[R] Mistake with contour...

2003-12-30 Thread [EMAIL PROTECTED]
I'm reading Ripley-Venables Modern Applied Statistics with S - Fourth edition , at the same time trying the examples proposed in the book using R 1.8.1 under linux. Now I'm trying the following code from the book (example code of spatial statistics at page 76) with R : | data(topo)

Re: [R] Mistake with contour...

2003-12-30 Thread Prof Brian Ripley
On Tue, 30 Dec 2003, [EMAIL PROTECTED] wrote: I'm reading Ripley-Venables Modern Applied Statistics with S - Fourth edition , at the same time trying the examples proposed in the book using R 1.8.1 under linux. Now I'm trying the following code from the book (example code of spatial

RE: [R] Writing data frames

2003-12-30 Thread Simon Fear
Another way in this particular case is to transpose m: write.table(t(m), file=, row.names=FALSE,quote=FALSE) This transposition creates a 1x2 matrix, for which there is a method (as.data.frame.matrix). (Don't just use as.matrix(m), that will be a 2x1 matrix.) Note that there is a missing

[R] dyn.unload? library.dyn.unload?

2003-12-30 Thread wolski
Hi! The writing R extension states. The shared object/DLL is loaded by dyn.load and unloaded by dyn.unload. Unloading is not normally necessary, but it is needed to allow the DLL to be re-built on some platforms, including Windows. I am working on Windows. I load the dll as described in

[R] odd results from polr vs wilcoxon test

2003-12-30 Thread Jonathan Williams
Dear R helpers, I would like to ask why polr occasionally generates results that look very odd. I have been trying to compare the power of proportional odds logistic regression with the Wilcoxon test. I generated random samples, applied both tests and extracted and compared the p-values, thus:-

Re: [R] Assignments in loops

2003-12-30 Thread Thomas Lumley
On Tue, 30 Dec 2003, Murray Jorgensen wrote: Thanks to Andy, Peter and Roger for drawing my attention to assign(), which is just what I needed and works fine. I will just add the usual note that when you find yourself using assign() it is a good idea to think very carefully about why you can't

Re: [R] odd results from polr vs wilcoxon test

2003-12-30 Thread Thomas Lumley
On Tue, 30 Dec 2003, Jonathan Williams wrote: summary(fit1) Call: polr(formula = ordered(dat) ~ grp, control = c(maxiter = 1, trace = 0)) Coefficients: Value Std. Errort value grp -15.82468 169.3329 -0.0934531 Intercepts: ValueStd. Error t value 2|3

[R] Rmpi and PBS

2003-12-30 Thread Shengqiao Li
Hello: Anybody knows how to run Rmpi through PBS (Portable Batch System) on a cluster computer. I'm using a supercomputer which require to submit jobs to PBS queue for dispatching. I tried use mpirun in my PBS script. But all my Rslaves are spawned to the same node. This is not desired. Any

[R] regexp problem on R 1.7.0

2003-12-30 Thread Itay Furman
Hi, Am I missing something in using regexps in R? Below, 'egrep' means invokation of the command from the shell prompt. # I have as.character(block.dist.vals) [1] 1e+06 2e+06 5e+06 # that I wish to convert to: 1 2 5 # OK (R and egrep) sub( e.+06, , as.character(block.dist.vals) ) [1] 1 2 5

Re: [R] regexp problem on R 1.7.0

2003-12-30 Thread Prof Brian Ripley
In R (and C) \ must be escaped in a character string. This is mentioned on the help page. On Tue, 30 Dec 2003, Itay Furman wrote: Hi, Am I missing something in using regexps in R? Below, 'egrep' means invokation of the command from the shell prompt. # I have

[R] floor of n observations in number generators

2003-12-30 Thread Marcus Davy
I couldnt find a previous posting on this in the archives, maybe it has already been mentioned. If you use a calculation to generate n observations in random number generators and you don't round to the nearest integer you may be generating n-1 numbers not n numbers as you thought depending on

Re: [R] floor of n observations in number generators

2003-12-30 Thread Peter Dalgaard
Marcus Davy [EMAIL PROTECTED] writes: I couldnt find a previous posting on this in the archives, maybe it has already been mentioned. If you use a calculation to generate n observations in random number generators and you don't round to the nearest integer you may be generating n-1 numbers

Re: [R] regexp problem on R 1.7.0

2003-12-30 Thread Gabor Grothendieck
Just as an elaboration, this might help further clarify it. Spit displays each character in x -- one per line. spit - function(x) for(i in 1:nchar(x)) cat(i,substring(x,i,i),\n) spit(e\+06) # note that the resulting string does not contain \ 1 e 2 + 3 0 4 6 spit(e\\+06) # this time its

[R] MASS package and lda

2003-12-30 Thread Sean Davis
I'm sorry if I am missing something, but I am looking for the lda function and can't find it (used to be in MASS). I know there is reorganization going on for R-1.9 and expected to find lda in stats, but I didn't. Do I need to go back to R-1.8.1 or is there an lda function lurking that I