1.2.pems.structure: 'pems' object structure

Description Usage Arguments Details Value Warning Note Author(s) References See Also Examples

Description

This pages provides a brief outview description of the 'pems' object structure. It also lists some associated functions

Usage

1
2
3
4
5
6
7
getElement(input, pems=NULL, ..., 
          fun.name = "getElement", if.missing = "stop",
          input.name = deparse(substitute(input)))

getData(pems=NULL, ..., 
          fun.name = "getData", if.missing = "stop",
          pems.name = deparse(substitute(pems)))

Arguments

input

(A required pems element) For getElement, the required data element (data series in data).

pems

(pems object) If supplied, the pems object to search for element before checking the parent environments and R workspace.

...

(Optional) Other Arguments, currently ignored.

fun.name, if.missing, input.name, pems.name

(Various) Other options using for pems.utils house-keeping. See check... for definitions, although generally these can be ignored by users. See Note below.

Details

The pems object is a managed data.frame. It has five main components: data, units, constants, history and tags. data is the main data.frame. Each element (named data.frame column) is a data-series of the original PEMS data. units are the associated unit definitions. constants is a list of associated constants that are to be used with the pems object. (The preference order is defaults set by pems.utils < constants declared for the pems object < constants given in a call.) history is a log of pems object modifications. tags are basically any other components that the user wishes to add to a pems object as identifiers.

getElement gets a requested data element.

getData gets the data component of a supplied pems object.

Value

getElement returns the requested element as a vector, if available. (If missing, error handling is managed by if.missing. See check... for more details.)

getData returns the data component of a supplied pems object as a data.frame.

Warning

get... arguments and operations may change with pems.utils version. Also see Note.

Note

get... functions are in development pems object handlers. They are intended for convenient 'front of house' use. As part of this role, their structure will evolve over time, so arguments and operations may change based on user feedback. Those wishing to develop future-proof third party functions should also consider check... functions when developing their code. See common.calculations for some Examples.

Author(s)

Karl Ropkins

References

References in preparation.

See Also

See check....

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
###########
##example 1 
###########

#basic usage

getElement(velocity, pems.1)

#check... equivalent
#checkInput(veolcity, pems.1)

pems documentation built on May 2, 2019, 5:20 p.m.