[R] read csv

Thomas Hunger hto at arcor.de
Mon Sep 4 19:42:34 CEST 2006

> 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 != "") > 2})



More information about the R-help mailing list