Data I/O convenience functions

read_text(text, ...)

Arguments

text

a character vector of length 1. Should resemble the contents of a CSV file.

...

additional arguments passed directly to read.csv

Value

a data.frame

Examples

t <- "id,x,y a,1,2 b,3,4" read_text(t, strip.white = TRUE)
#> id x y #> 1 a 1 2 #> 2 b 3 4
t <- "id,x,y\na,1,2\nb,3,4" read_text(t)
#> id x y #> 1 a 1 2 #> 2 b 3 4