[R] problem with read.table
skiadas at hanover.edu
Wed May 23 04:07:59 CEST 2007
On May 22, 2007, at 9:41 PM, Alex Tsoi wrote:
> Dear all,
> I try to use read.table to get the data from a tab delimited file,
> and some
> of the data is shown below:
> and it means that whenever read.table reads ' , it skips the next
> until it reads ' again....
> Could anyone show me how to solve this kind of problem ?
> I greatly appreciate for any suggestion. Thanks.
You might want to have a look at ?read.table for more details, but
the following should do it:
test <- read.table("data.txt", colClasses = "character", sep="\t",
Essentially by default read.table sees both " and ' as quote
delimiters. In your data, you only want " as a quote delimiter.
> Alex Tsoi-
Department of Mathematics and Computer Science
More information about the R-help