Skip to contents

Transfer Python object into an R session.

Usage

rxp_py2r(name, expr, nix_env = "default.nix")

Arguments

name

Symbol, name of the derivation.

expr

Symbol, Python object to be loaded into R.

nix_env

Character, path to the Nix environment file, default is "default.nix".

Value

A list with elements: name, the name of the derivation, snippet, the Nix boilerplate code, type, additional_files (for compatibility reasons only) and nix_env.

Details

rxp_py2r(my_obj, my_python_object) loads a serialized Python object and saves it as an RDS file using reticulate::py_load_object().

Examples

if (FALSE) { # \dontrun{
  rxp_py2r(my_obj, my_python_object)
} # }