# Literal csv
datasource("a,b,c\n1,2,3")
datasource(charToRaw("a,b,c\n1,2,3"))
# Strings
datasource(system.file("extdata/mtcars.csv", package = "readr"))
datasource(system.file("extdata/mtcars.csv.bz2", package = "readr"))
datasource(system.file("extdata/mtcars.csv.zip", package = "readr"))
datasource("https://github.com/hadley/readr/raw/master/inst/extdata/mtcars.csv")
# Connection
datasource(rawConnection(charToRaw("abc\n123")))
Run the code above in your browser using DataLab