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.
ssimLibrary( name = NULL, summary = NULL, package = NULL, session = NULL, addon = NULL, template = NULL, forceUpdate = FALSE, overwrite = FALSE ) # S4 method for SsimObject ssimLibrary( name = NULL, summary = NULL, package = NULL, session = NULL, addon = NULL, template = NULL, forceUpdate = FALSE, overwrite = FALSE ) # S4 method for missingOrNULLOrChar ssimLibrary( name = NULL, summary = NULL, package = NULL, session = NULL, addon = NULL, template = NULL, forceUpdate = FALSE, overwrite = FALSE )
name |
|
---|---|
summary | logical. Default is |
package | character. The package type. Default is "stsim" |
session |
|
addon | character or character vector. One or more addon packages. See
|
template | character. Creates the SsimLibrary with the specified template (optional) |
forceUpdate | logical. If |
overwrite | logical. If |
Returns a SsimLibrary
object.
Example arguments:
If name is SyncroSim Project or Scenario: Returns the
SsimLibrary
associated with the Project or Scenario.
If name is NULL
: Create/open a SsimLibrary in the current working
directory with the filename SsimLibrary.ssim.
If name is a string: If string is not a valid path treat as filename in working directory. If no file suffix provided in string then add .ssim. Attempts to open a SsimLibrary of that name. If SsimLibrary does not exist creates a SsimLibrary of type package in the current working directory.
If given a name and a package: Create/open a SsimLibrary called <name>.ssim. Returns an error if the SsimLibrary already exists but is a different type of package.
#>#># 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)#> class : Session #> filepath [character]: C:/Program Files/SyncroSim #> silent [logical] : TRUE #> printCmd [logical] : FALSE# 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)#># }