ewsnet_init {EWSmethods} | R Documentation |
EWSNet Initialisation
Description
Prepares your R session for communicating with Python. This function first searches your computer for an appropriate Python environment and activates it, importing the vital Python packages required. If no appropriate Python install or environment is found, after asking permission, miniconda is downloaded and an environment created.
Usage
ewsnet_init(
envname,
conda_path = reticulate::miniconda_path(),
pip_ignore_installed = FALSE,
auto = FALSE
)
Arguments
envname |
A string naming the desired Python environment to create/activate. If no Python or environment found, the functions prompts to install miniconda and the required python packages. |
conda_path |
The location to install Python. By default, this follows |
pip_ignore_installed |
Boolean. If |
auto |
Boolean. If |
Value
Does not return an object as is simply preparing your R session.
Examples
## Not run:
ewsnet_init(envname = "EWSNET_env", auto = FALSE)
## End(Not run)
#Common errors at this stage result from 'reticulate's
#behaviour. For example, conflicts between 'ewsnet_init'
#and RETICULATE_PYTHON may occur if run inside a
#RStudio R project. To fix this, navigate to
#Preferences -> Python, untick 'Automatically
#activate project-local Python environments'
#and restart R.
#if this fails due to timeout, you may need to
#increase the timeout length using something
#like below:
options(timeout = max(300, getOption("timeout")))
## Not run:
reticulate::py_config()
## End(Not run)
#If successful, 'EWSNET_env forced by use_python
#function' will be printed.