Skip to main content
Skip table of contents

Unified Agent - Resolving 'R' Packages with Packrat

Prerequisites: Set up R environment 

1. Install R for the OS you are using: https://cran.r-project.org/

1a. If you are using a Windows machine, install Rtools: ( Rtools for Windows )

2. Install and initialize Packrat:

CODE
C:\Users\RamMatzkovsky>R
> install.packages("packrat")
> packrat::init()

3. Install the package you want to scan.
For example: https://mran.microsoft.com/package/wmtsa

CODE
> install.packages("wmtsa")

4. Snapshot (save) the changes.

CODE
> packrat::snapshot()

5. Verify that the packrat.lock file is now present. The file should be created in a new packrat subfolder under the installed package folder, for example:

C:\Users\RamMatzkovsky\Documents\R\win-library\3.6\wmtsa\packrat\packrat.lock

It contains a list of all dependency information (including transitive dependencies).

Unified Agent configuration

In the configuration file, set the following:

CODE
r.resolveDependencies=true
r.runPreStep=true  # can be set to false if you have already run packrat::init()
r.ignoreSourceFiles=true
r.cranMirrorUrl=https://cloud.r-project.org/

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.