Re: [R] reading in results from system(). There must be an easier way...

2008-09-22 Thread Michael A. Gilchrist
Sorry, I misunderstood what I was doing and misspoke. I don't think there's a bug. I had called COMMAND w/in read.delim. Thanks for all of your help and sorry for the misinformation. Sincerely, Mike - Department of Ecology Evolutionary

Re: [R] reading in results from system(). There must be an easier way...

2008-09-18 Thread Michael A. Gilchrist
Wow, that's elegant and simple. It's also faster than my approach. NB, you don't need to use close(), read.delim() closes the pipe when its done reading. Thank you all for your suggestions, they really helped me with this problem and understand R just a bit better. Sincerely, Mike

Re: [R] reading in results from system(). There must be an easier way...

2008-09-18 Thread Henrik Bengtsson
On Thu, Sep 18, 2008 at 1:39 PM, Michael A. Gilchrist [EMAIL PROTECTED] wrote: Wow, that's elegant and simple. It's also faster than my approach. NB, you don't need to use close(), read.delim() closes the pipe when its done reading. If read.delim() close the connection in this case, it's a

[R] reading in results from system(). There must be an easier way...

2008-09-12 Thread Michael A. Gilchrist
Hello, I am currently using R to run an external program and then read the results the external program sends to the stdout which are tsv data. When R reads the results in it converts it to to a list of strings which I then have to maniuplate with a whole slew of commands (which, figuring

Re: [R] reading in results from system(). There must be an easier way...

2008-09-12 Thread Marc Schwartz
on 09/12/2008 11:34 AM Michael A. Gilchrist wrote: Hello, I am currently using R to run an external program and then read the results the external program sends to the stdout which are tsv data. When R reads the results in it converts it to to a list of strings which I then have to

Re: [R] reading in results from system(). There must be an easier way...

2008-09-12 Thread Gabor Grothendieck
The conversion to a data frame and the transpose might be time consuming. In addition to other comments you have received, try this: matrix(rawinput, ncol = 6, byrow = TRUE) and if you don't really need a data frame eliminate the conversion from matrix to data.frame. You might time this

Re: [R] reading in results from system(). There must be an easier way...

2008-09-12 Thread Henrik Bengtsson
Hi, a few comments below. On Fri, Sep 12, 2008 at 9:34 AM, Michael A. Gilchrist [EMAIL PROTECTED] wrote: Hello, I am currently using R to run an external program and then read the results the external program sends to the stdout which are tsv data. When R reads the results in it converts

Re: [R] reading in results from system(). There must be an easier way...

2008-09-12 Thread Prof Brian Ripley
Why not use con - pipe(COMMAND) foo - read.delim(con, colClasses=numeric) close(con) ? See the 'R Data Input/Output Manual'. On Fri, 12 Sep 2008, Michael A. Gilchrist wrote: Hello, I am currently using R to run an external program and then read the results the external program sends to