Learn R Programming

DTSg (version 0.2.0)

cols.DTSg: Get Column Names

Description

Queries all column names of a DTSg object or those of a certain class only.

Usage

# S3 method for DTSg
cols(x, class = "all", ...)

Arguments

x

A DTSg object (S3 method only).

class

A character string matched to the most specific class (first element) of each column's class vector or "all" for all column names.

Not used (S3 method only).

Value

Returns a character vector.

See Also

DTSg, class

Examples

Run this code
# NOT RUN {
# 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")

# }

Run the code above in your browser using DataLab