View source: R/run_python_script.R
run_python_script | R Documentation |
Run a Python script
run_python_script( python_script_path, ormr_folder_name = get_default_ormr_folder_name(), python_version = get_default_python_version(), verbose = FALSE )
python_script_path |
path to a Python script |
ormr_folder_name |
can be either |
python_version |
the version of Python used. Use get_default_python_version to get the default Python version. |
verbose |
the verbosity of a function. Set to TRUE for more output. Use check_verbose to detect if this argument is valid. |
The output of the Python script
Richèl J.C. Bilderbeek
use run_python_script_with_args to run a Python script with command-line arguments
if (plinkr::is_on_ci()) { if (is_conda_installed()) { # Use conda ormr_folder_name <- create_default_conda_env() } else { # Use local python ormr_folder_name <- "python3" } python_script_path <- system.file( "extdata", "hello_world.py", package = "ormr" ) run_python_script( ormr_folder_name = ormr_folder_name, python_script_path = python_script_path ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.