Generic handling of pems.element objects

Share:

Description

pems elements objects can be manipulated using generic functions like print, plot and summary in a similar fashion to objects of other R classes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## S3 method for class 'pems.element'
 x[i, ..., force = TRUE, wrap = FALSE]

## S3 replacement method for class 'pems.element'
 x[i, ..., force = TRUE, wrap = FALSE] <- value

## S3 method for class 'pems.element'
print(x, ...)

## S3 method for class 'pems.element'
plot(x, y = NULL, xlab = NULL, ylab = NULL, ...)

## S3 method for class 'pems.element'
units(x)

## S3 replacement method for class 'pems.element'
units(x) <- value

## S3 method for class 'pems.element'
summary(object, ...)

Arguments

x,object

(An Object of pems.element class). For direct use with print, plot, summary, etc. NOTE: Object naming (i.e., x or object) is determined in parent or base function in R, so naming can vary by method.

i

Element indices, which operate in a similar fashion to vector indices.

...

Addition options, typically passed to associated default method(s).

force, wrap

(Logicals) Data element handling options: force forces data to fit it destination; wrap expands data to fit its destination by wrapping the source pems.element.

value

(Vector) For calls in pems.element[1] <- value or units(pems.element) <- value, the value to be inserted.

y, xlab, ylab

(other plot arguments). As with the default plot method, y is an optional second data verctor, typically numeric, and xlab and ylab are labels to use on x and y axes.

Value

Generic functions provide appropriate (conventional) handling of objects of 'pems.elements' class:

print(pems.element) provides a (to console) description of the supplied pems.element object.

plot(pems.element) generates a standard R plot of the supplied pems.element.

units(pems.element) extracts the units from the supplied pems.element.

Author(s)

Karl Ropkins

Examples

1
2
#the velocity pems.element in pems.1
pems.1$velocity