delete: Delete library, project, scenario, datasheet

Description Usage Arguments Value Examples

Description

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

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
delete(
  ssimObject,
  project = NULL,
  scenario = NULL,
  datasheet = NULL,
  force = FALSE
)

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

## S4 method for signature '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

1
2
3
4
5
6
7
8
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)

rsyncrosim documentation built on Feb. 16, 2021, 9:06 a.m.