Re: [R] Reading data entered within an R program

2009-07-12 Thread Sam Thomas
threeftmetered Sent from my Windows MobileĀ® phone. -Original Message- From: Muenchen, Robert A (Bob) muenc...@utk.edu Sent: Saturday, July 11, 2009 4:43 PM To: R-help@r-project.org R-help@r-project.org Subject: [R] Reading data entered within an R program Dear R-helpers, I know of two

[R] Reading data entered within an R program

2009-07-11 Thread Muenchen, Robert A (Bob)
Dear R-helpers, I know of two ways to reading data within an R program, using textConnection and stdin (demo program below). I've Googled about and looked in several books for comparisons of the two approaches but haven't found anything. Are there any particular advantages or disadvantages to

Re: [R] Reading data entered within an R program

2009-07-11 Thread milton ruser
*hum* I prefer stdin() because you not need to explain to your student or beginners about TextConnection. cheers milton On Sat, Jul 11, 2009 at 4:38 PM, Muenchen, Robert A (Bob) muenc...@utk.eduwrote: Dear R-helpers, I know of two ways to reading data within an R program, using

Re: [R] Reading data entered within an R program

2009-07-11 Thread Gabor Grothendieck
Both will work if you copy and paste directly into an R session but textConnection has the advantage that you can place it in a file and source it and it still works. On Sat, Jul 11, 2009 at 4:38 PM, Muenchen, Robert A (Bob) muenc...@utk.eduwrote: Dear R-helpers, I know of two ways to reading

Re: [R] Reading data entered within an R program

2009-07-11 Thread Muenchen, Robert A (Bob)
Since stdin seemed simpler I figured textConnection must have some advantage. Thanks! Bob From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] Sent: Saturday, July 11, 2009 6:00 PM To: Muenchen, Robert A (Bob) Cc: R-help@r-project.org Subject: Re: [R] Reading data entered within