package: Installed or available packages

packageR Documentation

Installed or available packages

Description

Retrieves the packages installed or available for this version of SyncroSim.

Usage

package(ssimObject = NULL, installed = TRUE, listTemplates = NULL)

## S4 method for signature 'character'
package(ssimObject = NULL, installed = TRUE, listTemplates = NULL)

## S4 method for signature 'missingOrNULL'
package(ssimObject = NULL, installed = TRUE, listTemplates = NULL)

## S4 method for signature 'Session'
package(ssimObject = NULL, installed = TRUE, listTemplates = NULL)

## S4 method for signature 'SsimLibrary'
package(ssimObject)

Arguments

ssimObject

Session or SsimLibrary object. If NULL (default), session() will be used

installed

logical or character. TRUE (default) to list installed packages, FALSE to list available packages, and "BASE" to list installed base packages

listTemplates

character. Name of a SyncroSim package. If not NULL (default), then lists all templates available for that package. The package must be installed in the current Session. Ignored if ssimObject is a SsimLibrary object

Value

Returns a data.frame of packages installed or templates available for a specified package.

Examples

## Not run: 
# Set the file path and name of the new SsimLibrary
myLibraryName <- file.path(tempdir(),"testlib")

# Set the SyncroSim Session and SsimLibrary
mySession <- session()
myLibrary <- ssimLibrary(name = myLibraryName, session = mySession)

# List all installed packages
package(mySession)

# List all the installed base packages
package(installed = "BASE")

# List all available packages on the server (including currently installed)
package(installed = FALSE)
 
# Check the package you're SsimLibrary is currently using
package(myLibrary)

# Check the templates available for an installed package
addPackage("helloworldSpatial")
package(listTemplates = "helloworldSpatial")

## End(Not run)


rsyncrosim documentation built on Oct. 7, 2023, 9:08 a.m.