cols.DTSg: Get Names of Value Columns

Description Usage Arguments Value See Also Examples

Description

Queries all column names of a DTSg object, those of certain classes and/or those matching a certain pattern only.

Usage

1
2
## S3 method for class 'DTSg'
cols(x, class = NULL, pattern = NULL, ...)

Arguments

x

A DTSg object (S3 method only).

class

An optional character vector matched to the most specific class (first element) of each column's class vector.

pattern

An optional character string passed on to the pattern argument of grep.

...

Further arguments passed on to grep. The value argument is rejected.

Value

Returns a character vector.

See Also

DTSg, class, grep

Examples

1
2
3
4
5
6
7
8
9
# new DTSg object
x <- DTSg$new(values = flow)

# get names of numeric columns
## R6 method
x$cols(class = "numeric")

## S3 method
cols(x = x, class = "numeric")

DTSg documentation built on May 30, 2021, 5:06 p.m.