I am about to create a python interface in R with the package Reticulate. In order to access the python functions in R, the respective python packages need to be installed.
Two questions came to my mind:
1) If you use the reticulate package, does the Anaconda package need to be installed? Or is it sufficient to install the python packages only?
2) Is it possible to install python packages in R, similar to install.packages("r_package")?
Does anyone have experience with this Topic? Thanks in advance!
I'll add a little bit of nuance to the previous answer.
Like @f0nzie said, Anaconda is not a package, but a package manager. Ideally, you will create an environment using Anaconda to assist with your package management and version control. The documentation for conda environments is here.
Now, you can install python packages to your anaconda package in R. That is possible using reticulate::conda_install(envname, packages)
. The documentation for conda_install()
can be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With