# How to install additional R packages into custom notebook image?

**URL:** <https://discourse.jupyter.org/t/how-to-install-additional-r-packages-into-custom-notebook-image/4062>\
**Category:** JupyterHub\
**Created:** [April 20, 2020, 8:11pm UTC](https://discourse.jupyter.org/t/how-to-install-additional-r-packages-into-custom-notebook-image/4062 "2020-04-20T20:11:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wierzba3](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/wierzba3/32/1205_2.png) [@wierzba3](https://discourse.jupyter.org/u/wierzba3)\
**Post date:** [April 20, 2020, 8:11pm UTC](https://discourse.jupyter.org/t/how-to-install-additional-r-packages-into-custom-notebook-image/4062/1 "2020-04-20T20:11:26Z")

</div>

I customize the user notebook environment [like so](https://zero-to-jupyterhub.readthedocs.io/en/latest/customizing/user-environment.html#customize-an-existing-docker-image) (installing custom python packages)

How can I install custom R packages? Specifically, I am looking to install:

- reticulate
- mvtnorm
- gdata
- matrixcalc
- gtools
- mpoly
- moments

These are available in CRAN

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [April 20, 2020, 9:34pm UTC](https://discourse.jupyter.org/t/how-to-install-additional-r-packages-into-custom-notebook-image/4062/2 "2020-04-20T21:34:13Z")

</div>

Have you looked at [https://github.com/rocker-org/rocker/blob/c8a32175e360ad9bba68d9e25235fd982bf3816b/r-base/3.6.3/Dockerfile](https://github.com/rocker-org/rocker/blob/c8a32175e360ad9bba68d9e25235fd982bf3816b/r-base/3.6.3/Dockerfile) and [https://github.com/rocker-org/rocker-versioned/blob/896b455f2bebb0d65296c962b8fbb9d33b8a5f85/tidyverse/latest.Dockerfile](https://github.com/rocker-org/rocker-versioned/blob/896b455f2bebb0d65296c962b8fbb9d33b8a5f85/tidyverse/latest.Dockerfile) ?
