When using conda to install R packages, add
r-
before the regular package name. For instance, to install rbokeh, use conda install r-rbokeh
. To install rJava, use conda install r-rjava
.r-base
package.
Run the commands in the following sections in Anaconda Prompt (Terminal on macOS/Linux).
Updating R packages
Exercise caution when using conda to update RStudio or other R packages to their latest versions. This might break your conda RStudio environment.
-
Update all of the packages and their dependencies by running the following command:
-
If a new version of a package is available in the R channel, update specific packages by running the following command:
Creating and sharing custom R bundles
Creating and sharing custom R bundles is similar to creating and sharing conda packages. In the following example, we will create a simple custom R bundle metapackage named “Custom-R-Bundle”.-
Create the metapackage “Custom-R-Bundle” that contains several popular programs and their dependencies by running the following command:
-
Upload the new metapackage to your channel on anaconda.org by running the following commands:
Creating an environment with R
- Download and install Anaconda.
-
Create a new with all the
r-essentials
conda packages built from CRAN by running the following command: -
Activate the environment by running the following command:
-
List the packages in the environment by running the following command:
r-base
is installed and r-
is listed in the build string of the other R packages in the environment.
Creating a new environment with R
When creating a new environment, you can use R by explicitly includingr-base
in your list of packages:
Uninstalling R Essentials
Uninstall the R Essentials package by running the following command:This removes only R Essentials and disables R language support. Other R language packages are not removed.