[R] read a file of text with read.table
ruipbarradas at sapo.pt
Thu Jun 26 10:45:15 CEST 2014
Try using option stringsAsFactors = FALSE.
Hope this helps,
On 26/06/2014 09:32, carol white wrote:
> It might be a primitive question but I have a file of text and there is no separator between character on each line and the strings on each line have the same length. The format is like the following
> When I read the file with read.table("myfile",colClasses = "character"), instead of putting the strings in a table of number of rows x length of string, read.table saves the file in a table of number of rows x 1 and each element seems to be a factor. Why does read.table not account for colClasses = "character"?
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help