On Wed, 2004-09-29 at 21:35, Johnny Zhang wrote:
> Hi Friends,
> I have a data set like this
> 1
> 2 3 4 5
> 6 7
> 8 9 10
> Is there a way to read it into R as a row or column vector?
You can use scan(). Presuming that your data above is in a file called
"MyFile.txt":
> MyData <- scan("MyFile.txt")
Read 10 items
> MyData
[1] 1 2 3 4 5 6 7 8 9 10
See ?scan for more information.
HTH,
Marc Schwartz
______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html