[R] read.csv to read output of system()?
Marianne Promberger
marianne.promberger at kcl.ac.uk
Sat Dec 12 18:16:40 CET 2009
David Winsemius <dwinsemius at comcast.net> 12-Dec-09 17:12:
> > txt <- gsub("( [A-Za-z]+),","\\1;",readLines("file.csv"))
> > read.csv(textConnection(txt), header=TRUE)
> var1 var2 var3
> 1 one two three
> 2 one this is a comment;with commas. three
Wonderful, thanks a lot!
Marianne
--
Marianne Promberger PhD, King's College London
http://promberger.info
R version 2.10.0 (2009-10-26)
Ubuntu 9.04
More information about the R-help
mailing list