Re: [R] read csv

From: Thomas Hunger <>
Date: Mon 04 Sep 2006 - 17:42:34 GMT

> 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(! & x != "") > 2})[selection]))

Tom mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue Sep 05 03:45:54 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 07 Sep 2006 - 07:51:18 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.