| rxp_r_file | R Documentation |
Creates a Nix Expression That Reads In a File (or Folder of Data) Using R
rxp_r_file(...)
... |
Arguments passed on to
|
The basic usage is to provide a path to a file, and the function
to read it. For example: rxp_r_file(mtcars, path = "data/mtcars.csv", read_function = read.csv).
It is also possible instead to point to a folder that contains many
files that should all be read at once, for example:
rxp_r_file(many_csvs, path = "data", read_function = \(x)(readr::read_csv(list.files(x, full.names = TRUE, pattern = ".csv$")))).
See the vignette("importing-data") vignette for more detailed examples.
An object of class rxp_derivation.
Other derivations:
rxp_jl(),
rxp_jl_file(),
rxp_py(),
rxp_py_file(),
rxp_qmd(),
rxp_r(),
rxp_rmd()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.