rmicrosoft-rdeployr

Reload Custom R Package from Source


I have created a custom package and would like to deploy it to a remote machine. Here is my current long workflow:

When others connect to the machine, they have to run install and library:

Is there a way I can share a custom package and have the workflow be:


Solution

  • Feedback in comments says the best practice is to install the package in a shared location.

    Here is how you can find a good place to install the packages.

    Running the following shows where libraries are loaded from

    .libPaths()
    # rserve2 rserve2 /opt/deployr/9.0.1/rserve/R
    #root root        /usr/lib64/microsoft-r/3.3/lib64/R/library
    

    There are two locations the R server is looking for libraries. One is owned by root so we shouldn't deploy here. The other location rserve2 has owndership and looks promising. We should create a library subfolder to store the shared packages.

    Based on this information, the work flow should be:

    When others connect to the machine, they can load the shared library: