Method new()
Initializing a Storage object.
Method add()
Adding an element.
Usage
Storage$add(
x,
identifier,
confirm = interactive() & self$confirm,
missing_identifier = self$missing_identifier
)
Arguments
x
[any]
An object to be saved.
identifier
[character()]
Pne or more identifiers (the identifier "all" is reserved to select
all elements).
confirm
[logical(1)]
Prompted for confirmation?
missing_identifier
[logical(1) | NA]
The value for not specified identifiers.
Getting elements.
Usage
Storage$get(
identifier = character(),
ids = integer(),
logical = "and",
confirm = interactive() & self$confirm,
missing_identifier = self$missing_identifier,
id_names = FALSE
)
Arguments
identifier
[character()]
Pne or more identifiers (the identifier "all" is reserved to select
all elements).
ids
[integer()]
One or more ids.
logical
[character(1)]
In the case that multiple identifiers are selected, how should they be
combined? Options are:
confirm
[logical(1)]
Prompted for confirmation?
missing_identifier
[logical(1) | NA]
The value for not specified identifiers.
id_names
[logical(1)]
Name the elements according to their ids?
removing elements
Usage
Storage$remove(
identifier = character(),
ids = integer(),
logical = "and",
confirm = interactive() & self$confirm,
missing_identifier = self$missing_identifier,
shift_ids = TRUE
)
Arguments
identifier
[character()]
Pne or more identifiers (the identifier "all" is reserved to select
all elements).
ids
[integer()]
One or more ids.
logical
[character(1)]
In the case that multiple identifiers are selected, how should they be
combined? Options are:
confirm
[logical(1)]
Prompted for confirmation?
missing_identifier
[logical(1) | NA]
The value for not specified identifiers.
shift_ids
[logical(1)]
Shift ids when in-between elements are removed?
Method number()
Computing the number of identified elements.
Usage
Storage$number(
identifier = "all",
missing_identifier = self$missing_identifier,
logical = "and",
confirm = FALSE
)
Arguments
identifier
[character()]
Pne or more identifiers (the identifier "all" is reserved to select
all elements).
missing_identifier
[logical(1) | NA]
The value for not specified identifiers.
logical
[character(1)]
In the case that multiple identifiers are selected, how should they be
combined? Options are:
confirm
[logical(1)]
Prompted for confirmation?
Method indices()
Returning indices based on defined identifiers.
Usage
Storage$indices(
identifier = "all",
logical = "and",
confirm = interactive() & self$confirm
)
Arguments
identifier
[character()]
Pne or more identifiers (the identifier "all" is reserved to select
all elements).
logical
[character(1)]
In the case that multiple identifiers are selected, how should they be
combined? Options are:
confirm
[logical(1)]
Prompted for confirmation?
Printing details of the saved elements.
Arguments
...
Currently not used.