Go back

How to install additional R-Packages

Follow below steps to install additional R-Packages.

  1. Open new ssh shell and run following commands.

/img/gcp/r-studio-support/ssh-option.png

sudo su 
cd /home/anaconda/bin
source activate r-env
R

/img/gcp/r-studio-support/install-additional-packages-commands-01.png

This will login you to R shell in r-env environment as root.

  1. Then install library in R shell using below command.
install.packages("gt")

/img/gcp/r-studio-support/install-packages-command.png

/img/gcp/r-studio-support/new-packaged-installed.png

  1. Once installation is complete, test importing library by running “library(gt)” and it should work.

a. SSH terminal with the ubuntu user-

/img/gcp/r-studio-support/new-packaged-installed-ssh-window.png

b. jupyter notebook -

/img/gcp/r-studio-support/new-packaged-installed-jupyter-notebook-02.png

c. R-Studio on desktop

/img/gcp/r-studio-support/new-packaged-installed-r-studio-desktop.png

Go back