Is there a way to use read.csv to read from a string value rather than a file in R?
I'm writing an R package where the R code talks to a Java application. The Java application outputs a CSV formatted string and I want the R code to be able to directly read the string and convert it into a data.frame. Dirk Eddelbuettel Editing a 7-year old answer: By now, this is much simpler thanks to the text= argument which has been added to read.csv() and alike: R> data <- read.csv(text="flim,flam + 1.2,2.2 + 77.1,3.14") R> data flim flam 1 1.2 2.20 2 77.1 3.14 R> Yes, look at the help for textConnection() -- the very powerful notion in R is that essentially all readers (as e.g. read.table