Re: [R] R and RS232-Interface?

2003-11-15 Thread Sean O'Riordain
Hi, Personally, I would avoid Java for hardware handling - in my experience this is tricky and very hardware specific. Sascha, is this for a Unix type machine or under windows? If under Unix/Linux, it should not be particularly difficult to send characters and receive characters in C

[R] Loading file to use with qda()

2003-11-15 Thread Kwang Kim
z - qda(train, cl) save(z, file = qda.dat) load(qda.dat) predict(qda.dat, test)$class I'm trying to save z where z -qda(train, cl) and load z for later use in predict(z, test)$class. I think I successfully saved z by save(z, file = qda.dat) but when I tried to load by load(qda.dat) and call

RE: [R] recognizing ( as a character

2003-11-15 Thread Henrik Bengtsson
You have to escape (=\\) such special characters, e.g. strsplit(abc(d)(e), split=\\() or put them in brackets (matches sets of characters) strsplit(abc(d)(e), split=[(]) if you think that is more readable. Similar for gsub(), grep(), regexpr() and friends. Henrik Bengtsson -Original

Re: [R] recognizing ( as a character

2003-11-15 Thread Uwe Ligges
Jean Eid wrote: Dear All, I have been trying to scan data from pdf files and use R to seperate them. The following will make it clear I have a line that reads Intrepid (D) 15,977 11,956 45,143 39,014 where what is in the parenthesis is either a D for domestic or I for import. I want to try to

Re: [R] Loading file to use with qda()

2003-11-15 Thread Uwe Ligges
Kwang Kim wrote: z - qda(train, cl) save(z, file = qda.dat) load(qda.dat) predict(qda.dat, test)$class I'm trying to save z where z -qda(train, cl) and load z for later use in predict(z, test)$class. I think I successfully saved z by save(z, file = qda.dat) but when I tried to load by

FW: [R] computing a p-value ...

2003-11-15 Thread Abdolell, Mohamed
Thanks to Rolph Turner and Jason Turner ... I guess I was too excited about getting back on the list after an absense of several years ... I'll be a little more thoughtful about the problem before posting next time, and a little less trigger-happy with the Send e-mail button. Never-the-less,

Re: [R] an object of class lm returned by lm?

2003-11-15 Thread Duncan Murdoch
On Sat, 15 Nov 2003 19:41:29 -0500, you wrote: Can someone tell me what an object of class lm returned by lm means? I assumed it mean the regression model - but I'm not sure how to enter this in. I have tried y~a+b but this is not working. I have also tried saving the regression results

Re: [R] an object of class lm returned by lm?

2003-11-15 Thread Jill Caviglia-Harris
Duncan: Thanks for your response. I actually tried this as well. The error message I get is objects of different length I thought I was chosign the model incorrectly, perhaps this is something else? -Jill *** Jill L. Caviglia-Harris, Ph.D.

[R] prevent conversion to factors in aggregate?

2003-11-15 Thread Jeff D. Hamann
I've been trying to figure out how to prevent a column that is the result of an aggregate function call so that I can use it in further calculations. For example, I would like to aggregate the expf for the data.frame by sp (character) and dbh (double d=rounded to integer) using the command: st2

Re: [R] prevent conversion to factors in aggregate?

2003-11-15 Thread Spencer Graves
I don't know how to prevent aggregate from making factors of everything, but the following shows how to cast them back into what you want: DF1 - data.frame(a=1:9, b=rep(letters[1:3], 3), d=rep(1:3, each=3)) DF. - aggregate(DF1$a, by=list(b=DF1$b, d=DF1$d), FUN=sum) sapply(DF., class)