Learn R Programming

rsyncrosim (version 1.2.9)

ssimLibrary: Create or open a library

Description

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

Usage

ssimLibrary(
  name = NULL,
  summary = NULL,
  package = NULL,
  session = NULL,
  addon = NULL,
  forceUpdate = FALSE,
  overwrite = FALSE
)

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

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

Arguments

name

Character string, Project/Scenario/SsimLibrary. The path to a library or SsimObject.

summary

Logical. Default TRUE.

package

Character. The package type. The default is "stsim".

session

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

addon

Character or character vector. One or more addons. See addon() for options.

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 Library will be overwritten.

Value

Returns a SsimLibrary object.

Details

  • 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 library of that name. If library does not exist creates a library of type package in the current working directory.

  • If given a name and a package: Create/open a library called <name>.ssim. Returns an error if the library already exists but is a different type of package.

Examples

Run this code
# NOT RUN {
# Create or open a library using the default session
myLibrary <- ssimLibrary(name = file.path(tempdir(), "mylib"))

# Create library using a specific session
mySession <- session()
myLibrary <- ssimLibrary(name = file.path(tempdir(), "mylib"), session = mySession)

session(myLibrary)
filepath(myLibrary)
info(myLibrary)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab