getCol.DTSg {DTSg} | R Documentation |
Get column vector
Description
Returns 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 |
col |
A character string specifying a column name. |
... |
Arguments passed on to |
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 the first ten values of the "flow" column
## R6 methods
x$getCol(col = "flow")[1:10]
x$`[`("flow")[1:10]
## S3 methods
getCol(x = x, col = "flow")[1:10]
x["flow"][1:10]
[Package DTSg version 1.1.3 Index]