View source: R/configure_environment.R
set_reticulate_python | R Documentation |
This function sets the RETICULATE_PYTHON environment variable to the path of the Python interpreter in the specified Conda environment, but only for the current R session. The change will not persist after the R session is closed.
set_reticulate_python(env_name = "GeneSelectR_env")
env_name |
The name of the Conda environment. Default is 'GeneSelectR_env'. |
This function checks if the specified Conda environment exists. If it does, the function sets the RETICULATE_PYTHON environment variable to the path of the Python interpreter in that environment. If the environment does not exist, the function stops with an error message.
Users need to run this function in every new R session where they want to use your package. Also, they should run this function before loading your package with library(), because the RETICULATE_PYTHON environment variable needs to be set before reticulate is loaded.
This function does not return a value. Instead, it sets the RETICULATE_PYTHON environment variable for the current R session and prints a message indicating the new value of RETICULATE_PYTHON. If the specified environment does not exist, the function stops with an error message.
set_reticulate_python('GeneSelectR_env')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.