| rxp_file | R Documentation |
You should not call it directly, but instead use one of rxp_r_file(),
rxp_py_file() or rxp_jl_file().
rxp_file(
lang,
name,
path,
read_function,
user_functions = "",
nix_env = "default.nix",
env_var = NULL,
encoder = NULL
)
lang |
|
name |
Symbol, the name of the derivation. |
path |
Character, the file path to include (e.g., "data/mtcars.shp") or a folder path (e.g., "data"). See details. |
read_function |
Function, an R function to read the data, taking one
argument (the path). This can be a user-defined function that is made available
using |
user_functions |
Character vector, user-defined functions to include. This should be a script (or scripts) containing user-defined functions to include during the build process for this derivation. It is recommended to use one script per function, and only include the required script(s) in the derivation. |
nix_env |
Character, path to the Nix environment file, default is "default.nix". |
env_var |
List, defaults to NULL. A named list of environment variables to set before running the R script, e.g., c(VAR = "hello"). Each entry will be added as an export statement in the build phase. |
encoder |
Function/character, defaults to NULL. A language-specific serializer to write the loaded object to disk.
|
Creates a Nix derivation that reads a file or folder of data using R, Python, or Julia. Handles user-defined functions, environment variables, and Nix environment specification.
An object of class rxp_derivation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.