Sets up the Python environment and lazily loads modules required for
running GRNBoost2: arboreto
, pandas
, and numpy
.
Automatically installs missing Python packages if requested.
Usage
init_py(
python_path = "/usr/bin/python3",
required = TRUE,
install_missing = FALSE,
install_method = "auto",
verbose = TRUE
)
Arguments
- python_path
Character string. Path to the Python executable, e.g.,
"/usr/bin/python3"
.- required
Logical. If
TRUE
, errors if Python is not available or path is invalid. Default:TRUE
.- install_missing
Logical. If
TRUE
, automatically installs missing Python packages. Default:FALSE
.- install_method
Character string. Installation method when
install_missing = TRUE
. Options: "auto", "conda", "pip". Default: "auto".- verbose
Logical. If
TRUE
, shows installation progress. Default:TRUE
.
Value
A list with three Python module objects:
arboreto
: GRNBoost2 algorithm module.pandas
: Data handling module.numpy
: Numerical operations module.