# 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')
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-jupyter.davidjachochavez.org/r/update-and-install-ir-kernel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
