I have a data file that looks like this.

__DATA__
D7KAR5Z02F447V  176 G   0.22
D7KAR5Z02J3WLG  94  A   1.05    29
D7KAR5Z02F4K6L  198 a   0.13
D7KAR5Z02J4SYO  67  C   0.95    28
D7KAR5Z02J4SYO  83  C   1.01    29
D7KAR5Z02J4SYO  97  T   0.13
D7KAR5Z02J4SYO  166 A   0.94    27


I want the rows where the last column has no-entry to be filled
with "-".

Is there a way to do it with read.table?
I don't find any option to do it with read.table.

This only fill the empty 5th column with blank.

dat <- read.table("myfile.txt",na.strings="-",header=FALSE,fill=T);

G.V.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to