Alternatives for setting up a Code environment (R)

NJ Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 4 Partner


i need to add some packages to a code environment, but these packages cannot be installed from CRAN repo or Conda.

I succeeded to install these packages from inside a notebook using two methods:

- install.packages(packageurl, repos=NULL, type="source")

- devtools::install_github(...)

I noticed that if the packages are installed into the Code environment path, the packages will be listed in the "Actually installed packages" section (after clicking the Update button), but these packages will be lost if the environment is rebuilt

So, is there any other way to include these packages into the Code repository?

Thanks in advance!


Best Answer

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭
    Answer ✓


    Indeed you can install packages from github using these methods.

    As you noted, since this is a manual operation, this will not be added to the package requirements of the code-env. Hence, these packages will be wiped if you rebuild the code-env from the UI.

    To manage installation of custom R packages in a reproducible way, I suggest setting up a local repository, for example using Minicran, and host your custom package releases on this repo. In the code-env custom options you will then be able to point to this local repo.

    Hopes it helps,


Setup Info
      Help me…