Re: [R] read csv

2006-09-04 Thread Thomas Hunger
> I have a csv file where the number of filled columns > varies in the different rows: I would hack it like this, but then I am totally new to R, which means you should not trust me.: d <- read.csv("testdata", header=F) selection <- apply(d, c(1), function(x) {sum(!is.na(x) & x != "") >

Re: [R] read csv

2006-09-04 Thread Prof Brian Ripley
On Mon, 4 Sep 2006, Georg Otto wrote: > > Hi, > > I have a csv file where the number of filled columns varies in the > different rows: > > Sun 5-Feb-06,15,,,01:30:00,0:06:00, > Mon 6-Feb-06,, > Tue 7-Feb-06,7,,,00:41:00,0:05:51, > Wed 8-Feb-06,, > > I would like to use read.table (or w

[R] read csv

2006-09-04 Thread Georg Otto
Hi, I have a csv file where the number of filled columns varies in the different rows: Sun 5-Feb-06,15,,,01:30:00,0:06:00, Mon 6-Feb-06,, Tue 7-Feb-06,7,,,00:41:00,0:05:51, Wed 8-Feb-06,, I would like to use read.table (or whatever is appropriate) to read in only those rows that have tw