datasource | R Documentation |
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. To be recognised as
literal data, the input must be either wrapped with 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/main/inst/extdata/mtcars.csv") ## End(Not run) # Connection con <- rawConnection(charToRaw("abc\n123")) datasource(con) close(con)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.