[R] Data with no separator

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Thu Jan 12 23:47:38 CET 2006


On 12-Jan-06 Jeffrey T. Steedle wrote:
> I have data in which each row consists of a long string of number,
> letters, symbols, and blank spaces.  I would like to simply scan in
> strings of length 426, but R takes the spaces that occur in the data as
> separators.  Is there any way around this?
> 
> Thanks,
> Jeff Steedle 

You could use readLines(), perhaps?

  Data<-readLines("datafile")

should give you a vector Data of which each element is a
character string which is one line read from your datafile.

Best wishes,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 12-Jan-06                                       Time: 22:46:39
------------------------------ XFMail ------------------------------




More information about the R-help mailing list