unitted_access: Extract parts of a unitted object

Description Usage Arguments Details Value See Also

Description

The standard accessors x[...], x[[...]], and x$name are all available for unitted objects.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'unitted'
x[...]

## S3 method for class 'unitted'
x[[...]]

## S3 method for class 'unitted'
x$name

Arguments

x

The unitted data.frame, vector, etc. to be accessed

...

Arguments passed to accessors, typically including one or more extraction indices

name

The name of the column to be extracted

Details

x[...] extracts elements with their units.

x[[...]] drops most attributes but retains units.

x$name extracts a named column, with units, from a unitted data.frame

Value

A new data.frame, vector, etc. with the right units still attached.

See Also

unitted_assign for assignment to parts of objects; unitted for definition of the unitted class


appling/unitted documentation built on May 10, 2019, 12:44 p.m.