> For the complete documentation index, see [llms.txt](https://docs-jupyter.davidjachochavez.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-jupyter.davidjachochavez.org/r/update-and-install-ir-kernel.md).

# Update and Install IR Kernel

Update all packages in the current environment to the latest version, without prompts for permission:

```
update.packages(ask = FALSE)
```

Install IRkernel for all users:

```
install.packages('IRkernel', lib = '/usr/local/lib/R/site-library')
```

Make the IRkernel available to Jupyter. For system-wide installation, set user to False in the installspec command:

```
IRkernel::installspec(user = FALSE)
```

When ready, quit:

```
q()
```

💡 Install tidyverse and other packages<br>

Additional Ubuntu linux packages are needed for 'tidyverse' in R. In Ubuntu terminal:

```
apt install libssl-dev libcurl4-openssl-dev unixodbc-dev libxml2-dev libmariadb-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev
```

In R, install tidyverse for all users:

```
install.packages("tidyverse", dependencies = TRUE, INSTALL_opts = '--no-lock')
```

There are other useful R packages that one can install, for example:

```
install.packages("openxlsx", lib = '/usr/local/lib/R/site-library', dependencies = TRUE, INSTALL_opts = '--no-lock')
install.packages("knitr", lib = '/usr/local/lib/R/site-library', dependencies = TRUE, INSTALL_opts = '--no-lock')
```
