# R Package Install

## Install from CRAN

You can install your preferred R packages from [CRAN](https://cran.r-project.org) where you can find over 9,000 (as of 2016/8/20) packages.

#### 1. Click on 'R Packages' on the project list page.

![](/files/-M4oNEx3FX9EWMPKgIO9)

#### 2. Click 'Install' tab.

![](/files/-M4oNEx53KQskMOluXev)

#### 3. Type the package name and click on Install button.

## Install R Packages that are not on CRAN

If you want to install R packages that are not on CRAN, then you can install them in the standard R console by setting ‘libPath’ so that the packages will be installed into the location Exploratory is referencing to, which is under /.exploratory/R .

Example:

```
.libPaths("~/.exploratory/R/3.4")
install.packages("./h2o_3.14.0.3.tar.gz", repos = NULL)
```

If you want to use the functions from this custom R package as part of the command line then you want to add a custom R Script file that contains ‘library’ call so that your custom R package will be loaded. Please refer to [this blog post](https://blog.exploratory.io/adding-custom-r-scripts-to-extend-exploratory-desktop-a054832b9562#.68ny44np1) for how to add R Script to the projects.

## How to use installed R packages?

Here is a blog post that walk you through how to install and use your preferred R packages in Exploratory Desktop.

* [Installing R Packages from CRAN in Exploratory Desktop](https://blog.exploratory.io/installing-r-packages-from-cran-in-exploratory-desktop-36eae50cffb0#.8oqk14mrj)


---

# 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.exploratory.io/extend-with-r/r_package.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.
