[R] Why a multi column, tab delimited file has only one column after reading in with read.table specification sep="\t"
jrkrideau at yahoo.ca
Mon May 21 00:26:00 CEST 2007
Are you sure that there are tabs?
?read.table seems to say that this should work
Otherwise try read.delimited.
--- Yong Wang <wangyong1 at gmail.com> wrote:
> Dear all:
> I have a tab delimited file as following
> AGE WEIGHT PROTEIN ........
> 6 20 3 ........
> 8 39 4 ........
> I tried to read it as following:
> data <- read.table(file,sep="\t",header=T);
> but there is only column for the data after reading
>  200 1
> the column name is
> Any quick suggestion will be appreciated.
> Best Regards
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained,
> reproducible code.
More information about the R-help