Create a source object.
Create a source object.
datasource( file, skip = 0, skip_empty_rows = FALSE, comment = "", skip_quote = TRUE )
file |
Either a path to a file, a connection, or literal data (either a single string or a raw vector). Files ending in Literal data is most useful for examples and tests. It must contain at least one new line to be recognised as data (instead of a path) or be a vector of greater than length 1. Using a value of |
skip |
Number of lines to skip before reading data. |
# 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")) ## Not run: datasource("https://github.com/tidyverse/readr/raw/master/inst/extdata/mtcars.csv") ## End(Not run) # Connection con <- rawConnection(charToRaw("abc\n123")) datasource(con) close(con)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.