Support

FAQ for Public RStudio Package Manager

Follow

packagemanager.rstudio.com is a hosted instance of RStudio Package Manager for community use. packagemanager.rstudio.com provides a CRAN repository with features such as:

  • Precompiled binary packages for faster installations on Linux and Windows
  • Repository checkpoints for reproducibility across time
  • System dependency information for R packages

RStudio does not provide professional support for packagemanager.rstudio.com. If you need help, the best place to ask questions is RStudio Community. If you're reporting a problem, please create a topic here and provide as much information as you can.

 

How do I install packages from packagemanager.rstudio.com?

Navigate to the Setup page and follow the instructions to configure R or RStudio to use packages from packagemanager.rstudio.com.

To install binary packages, click the Binary button and select a Client OS to get the binary repository URL for your operating system. Binary packages are available on Linux and Windows for R 3.4, 3.5, 3.6, and 4.0.

Note that your R environment may require additional configuration steps to use binary packages from RStudio Package Manager, particularly on Linux. Consult the documentation for Configuring R on Linux or Configuring R on Windows to learn more.

When installing binary packages on Linux, you should see a message like this in your R console:

> install.packages("ggplot2")
...
* installing *binary* package ‘ggplot2’ ... 

On Windows, you should instead see a message like:

> install.packages("ggplot2")
...
package ‘ggplot2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\user\AppData\Local\Temp\RtmpiswaaW\downloaded_packages

 

How do I troubleshoot package installation issues?

Received source package from a binary repository URL

When installing packages from a binary repository URL, you may receive a source package instead of a binary package. When this happens, a message like this will appear in your R console:

> install.packages("RPostgreSQL")
...
* installing *source* package ‘RPostgreSQL’ ... 

In interactive R sessions on Windows, you may also see the following prompt:

> install.packages("dplyr")
Package which is only available in source form, and may need
  compilation of C/C++/Fortran: 'dplyr'
Do you want to attempt to install these from sources? (Yes/no/cancel)

Check that you have the correct binary repository URL for your operating system, and that you have met the prerequisites for using binary packages (see How do I install packages? above).

Otherwise, binaries may be unavailable for that package. RStudio Package Manager does not provide binaries for all CRAN packages. Notable exclusions include any CRAN packages with Bioconductor dependencies, such as Seurat or WGCNA.

Error loading binary package in R

You may see one of the following errors when loading binary packages in R:

> library(rJava)
Error: package or namespace load failed for 'rJava':
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/opt/R/3.6.3/lib/R/library/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
> library(sf)
Error: package or namespace load failed for 'sf' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/opt/R/3.6.3/lib/R/library/units/libs/units.so':
libudunits2.so.0: cannot open shared object file: No such file or directory
> library(Rcpp)
Error: package or namespace load failed for ‘Rcpp’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/opt/R/3.6.3/lib/R/library/Rcpp/libs/Rcpp.so':
 /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /opt/R/3.6.3/lib/R/library/Rcpp/libs/Rcpp.so)

Check that you have the correct binary repository URL for your operating system, and that you have met the prerequisites for using binary packages (see How do I install packages? above).

The most common issue is that your system is missing additional system dependencies that the package requires. To determine if a package requires additional system dependencies, search for the package in the RStudio Package Manager web interface, and check the list of system prerequisites for your operating system. For example:

https://packagemanager.rstudio.com/client/#/repos/1/packages/httr

System dependency installation commands for the httr package on Ubuntu 16.04

If you still see an error after installing the system prerequisites, please report the issue at RStudio Community here and provide as much information as you can, including your R version and operating system.

 

Comments