How to Install & Upgrade R Packages in Exploratory?

There are more than 21,000 R packages that are officially available on CRAN (The Comprehensive R Archive Network). These packages can help you do a lot of things ranging from accessing data, transforming data, visualizing data, building models, etc.

Can we use them in Exploratory?

Yes, absolutely!

Exploratory is built on top of R, which means most of the operations in Exploratory are actually done in R.

And this also means that you can install your favorite R packages from CRAN and use them in Exploratory.

This note will show you how you can install R packages into Exploratory.

If you are interested in what and how you can do with R packages inside Exploratory, take a look at many examples listed on this page.

Install R Package

1. Open 'Manage R Packages' dialog

First, you want to open the 'Manage R Package' dialog UI.

Under the 'Installed Packages' tab you will see all the already installed R packages.

Exploratory installs a set of R packages at the installation time. Those are called 'System' R package and can be found under the System tab.

You want to make sure that whatever the R package you want to use is not already installed in Exploratory.

2. Install a R package

Go to 'Install New Packages' tab.

And type in the package name. Note that the package name is case sensitive.

And click on the 'Install' button.

Once the install is done successfully, then you want to check your package is listed under 'User' tab.

By default, the package's checkbox is checked. This means that the package is ready to use, and you can use any functions from the package right away.

But, you can uncheck it if you want to explicitly load the package when you need it.

Let's say you want to use the package in Note or Dashboard then you can always call the 'library' function to load the package right before you use it.

Loading the R package right before you use it would be better because you can avoid potential conflict of functions whose names happen to be the same names of existing functions inside Exploratory.

Upgrade R Packages

All the R packages have dependency with R version. This means that when R version is upgraded all the R packages need to be upgraded as well.

When R development team releases a new version of R we release a new version of Exploratory usually a few weeks later after we do a series of testing and fixing compatibility issues.

And when you upgrade to this version of Exploratory, it will upgrade the R that is used by Exploratory and re-install the newer version of the system R packages that are compatible with the new version of R.

And this means that all the R packages you had installed before become obsolete, therefore you will need to upgrade those packages manually.

You will see 'Install' button for those R packages inside the 'Manage R Packages' dialog instead of 'Update' button.

You want to click on the 'Install' button, which will re-install the latest R package that is compatible with the R version inside Exploratory.

Export Chart Image
Output Format
PNG SVG
Background
Set background transparent
Size
Width (Pixel)
Height (Pixel)
Pixel Ratio