pad-methods {gbutils} | R Documentation |
Store and get data in pad objects
Description
Get and store information in a pad. pad
can be used on the
lefthand side of an assignment to store information in an object and
as normal function call to retrieve previously stored information.
Usage
pad(x, item)
pad(x, item, ...) <- value
Arguments
x |
the object where the information is stored. |
item |
the |
value |
the value to be stored |
... |
additional arguments (??? are these really possible? !!!) |
Details
This is a generic function. There are methods for x
of class
objectPad
. The generic works with the slot pad
of
x
. Currently there is no check if there is one.
To remove an item use pad(x,item) <- NULL
. So, by definition,
items may not have the value NULL
.
padcheck
checks if item
has a value and if so returns
TRUE
. Otherwise it returns FALSE
.
Value
The requested item.
If item
is missing a named list containing all stored items.
Methods
- x = "objectPad", item = "missing"
-
get all items stored in the pad
x
, as a named list. - x = "objectPad", item = "ANY"
-
get the requested
item
from the padx
. - x = "ANY", item = "missing"
-
get all items stored in the pad of
x
as a named list. - x = "ANY", item = "ANY"
-
get the requested
item
from the pad ofx
.
Author(s)
Georgi N. Boshnakov