Learn R Programming

rsyncrosim (version 2.1.9)

delete: Delete Project, Scenario, Folder, Chart or Datasheet

Description

Delete Project, Scenario, Folder, Chart or Datasheet

Usage

delete(
  ssimObject,
  project = NULL,
  scenario = NULL,
  folder = NULL,
  chart = NULL,
  datasheet = NULL,
  force = FALSE,
  session = NULL
)

# S4 method for SsimObject delete( ssimObject, project = NULL, scenario = NULL, folder = NULL, chart = NULL, datasheet = NULL, force = FALSE, session = NULL )

Value

Invisibly returns a list of boolean values corresponding to each input: TRUE upon success (i.e.successful deletion) and FALSE upon failure.

Arguments

ssimObject

SsimLibrary-class, Project-class, Scenario-class, Folder-class, or Chart-class object

project

character string, numeric, or vector of these. One or more Project-class names or ids. Note that project argument is ignored if ssimObject is a list. Note that integer ids are slightly faster (optional)

scenario

character string, numeric, or vector of these. One or more Scenario-class names or ids. Note that scenario argument is ignored if ssimObject is a list. Note that integer ids are slightly faster (optional)

folder

character string, numeric, or vector of these. One or more Folder-class names or ids. Note that folder argument is ignored if ssimObject is a list. Note that integer ids are slightly faster (optional)

chart

character string, numeric, or vector of these. One or more Chart-class names or ids. Note that chart argument is ignored if SsimObject is a list. Note that integer ids are slightly faster (optional)

datasheet

character string or vector of these. One or more datasheet names (optional)

force

logical. If FALSE (default), user will be prompted to approve removal of each item

session

Session-class object. If NULL (default), session() will be used. Only applicable when ssimObject argument is a character

Details

Deletes one or more items. Note that this is irreversible. To delete a library, you must use the deleteLibrary function instead.

Examples

Run this code
if (FALSE) {
# Specify file path and name of new SsimLibrary
myLibraryName <- file.path(tempdir(), "testlib")

# Set up a SyncroSim Session, SsimLibrary, and Project
mySession <- session()
myLibrary <- ssimLibrary(name = myLibraryName, session = mySession)
myProject <- project(myLibrary, project = "a project")

# Check the Projects associated with this SsimLibrary
project(myLibrary)

# Delete Project
delete(myLibrary, project = "a project", force = TRUE)

# Check that Project was successfully deleted from SsimLibrary
project(myLibrary)
}

Run the code above in your browser using DataLab