# Literal csv
datasource("a,b,c\n1,2,3")
datasource(charToRaw("a,b,c\n1,2,3"))
# Strings
datasource(readr_example("mtcars.csv"))
datasource(readr_example("mtcars.csv.bz2"))
datasource(readr_example("mtcars.csv.zip"))
if (FALSE) {
datasource("https://github.com/tidyverse/readr/raw/main/inst/extdata/mtcars.csv")
}
# Connection
con <- rawConnection(charToRaw("abc\n123"))
datasource(con)
close(con)
Run the code above in your browser using DataLab