Installing R Package from Github

Script to Install R Package

To install an R package from Github, you can create a Script with a line like following.

devtools::install_github("<author>/<repository>", upgrade="never")

upgrade="never" option is to avoid automatic upgrade of other R packages on which the installed package depends. We recommend it to avoid error caused by install_github function asking for input about what to do with those packages, and also so that other part of Exploratory keeps working fine.

When you create a Script, check off the “Load this script when the project is opened” option to avoid installing the same package everytime you open the project.

Then click the green Save button to install the package.

If a function from the installed package doesn’t work as expected.

If an older or different version of the package is already be installed, github_install finishes without installing it. To override and upgrade it, add the force=TRUE option to the install_github command like the following and try again.

devtools::install_github("<author>/<repository>", force=TRUE, upgrade="never")

Script to Load R Package when Project is Opened

If you want the R package to be loaded when you open the project, you can create a Script with a line like following.

library(<package name>)

For this Script, leave the “Load this script when the project is opened” option checked, since we want it to be called everytime the project is opened.

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