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:
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
> install.packages("wmtsa")
4. Snapshot (save) the changes.
> 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:
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/