Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getCol.DTSg

Get Column Vector


Description

Queries the values of a column of a DTSg object. The extract operator ([) acts as a shortcut for getCol.

Usage

## S3 method for class 'DTSg'
getCol(x, col = self$cols(class = "numeric")[1L], ...)

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

Arguments

x

A DTSg object (getCol S3 method only).

col

A character string specifying a column name.

...

Arguments passed on to getCol (only used by the extract operator).

Value

Returns a vector or a list in case of a list column.

See Also

Examples

# new DTSg object
x <- DTSg$new(values = flow)

# get values of "flow" column
## R6 methods
x$getCol(col = "flow")
x$`[`("flow")

## S3 methods
getCol(x = x, col = "flow")
x["flow"]

DTSg

A Class for Working with Time Series Based on 'data.table' and 'R6' with Largely Optional Reference Semantics

v0.7.0
MIT + file LICENSE
Authors
Gerold Hepp [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.