ssimLibrary: Create or open a SsimLibrary

Description Usage Arguments Details Value Examples

Description

Creates or opens a SsimLibrary object. If summary = TRUE, returns SsimLibrary summary info. If summary = NULL, returns SsimLibrary summary info if ssimObject is a SsimLibrary, SsimLibrary object otherwise.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ssimLibrary(
  name = NULL,
  summary = NULL,
  package = NULL,
  session = NULL,
  addon = NULL,
  template = NULL,
  forceUpdate = FALSE,
  overwrite = FALSE
)

## S4 method for signature 'SsimObject'
ssimLibrary(
  name = NULL,
  summary = NULL,
  package = NULL,
  session = NULL,
  addon = NULL,
  template = NULL,
  forceUpdate = FALSE,
  overwrite = FALSE
)

## S4 method for signature 'missingOrNULLOrChar'
ssimLibrary(
  name = NULL,
  summary = NULL,
  package = NULL,
  session = NULL,
  addon = NULL,
  template = NULL,
  forceUpdate = FALSE,
  overwrite = FALSE
)

Arguments

name

SsimLibrary, Project or Scenario object, or character string (i.e. path to a SsimLibrary or SsimObject)

summary

logical. Default is TRUE

package

character. The package type. Default is "stsim"

session

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

addon

character or character vector. One or more addon packages. See addon for options (optional)

template

character. Creates the SsimLibrary with the specified template (optional)

forceUpdate

logical. If FALSE (default) user will be prompted to approve any required updates. If TRUE, required updates will be applied silently

overwrite

logical. If TRUE an existing SsimLibrary will be overwritten

Details

Example arguments:

Value

Returns a SsimLibrary object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Make sure packages are installed
addPackage("stsim")
addPackage("stsimsf")

# Create or open a SsimLibrary using the default Session
myLibrary <- ssimLibrary(name = file.path(tempdir(), "mylib"))

# Create SsimLibrary using a specific Session
mySession <- session()

myLibrary <- ssimLibrary(name = file.path(tempdir(), "mylib"),
                         session = mySession)

# Retrieve SsimLibrary properties
session(myLibrary)

# Load a SsimLibrary with addon package
myLibrary <- ssimLibrary(name = file.path(tempdir(), "mylib"),
                         overwrite = TRUE, package = "stsim",
                         addon = "stsimsf")

# Create SsimLibrary from template
addPackage("helloworldSpatial")
mySession <- session()
myLibrary <- ssimLibrary(name = file.path(tempdir(), "mylib"), 
                         session = mySession,
                         package = "helloworldSpatial",
                         template = "example-library",
                         overwrite = TRUE)

rsyncrosim documentation built on Oct. 28, 2021, 1:07 a.m.