Learn R Programming

rsyncrosim (version 1.2.9)

delete: Delete library, project, scenario, datasheet

Description

Deletes one or more items. Note that this is irreversible.

Usage

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

# S4 method for character delete( ssimObject, project = NULL, scenario = NULL, datasheet = NULL, force = FALSE )

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

Arguments

ssimObject

SsimLibrary/Project/Scenario, or path to a library.

project

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

scenario

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

datasheet

character string or vector of these. One or more datasheet names.

force

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

Value

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

Examples

Run this code
# NOT RUN {
temp_dir <- tempdir()
myses <- session()
myLibrary <- ssimLibrary(name = file.path(temp_dir,"testlib"), session = myses)

myProject <- project(myLibrary, project = "a project")
project(myLibrary)
delete(myLibrary, project = "a project", force = TRUE)
project(myLibrary)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab