powered by
Queries all column names of a DTSg object, those of certain classes and/or those matching a certain pattern only.
DTSg
class
# S3 method for DTSg cols(x, class = NULL, pattern = NULL, ...)
A DTSg object (S3 method only).
An optional character vector matched to the most specific class (first element) of each column's class vector.
An optional character string passed on to the pattern argument of grep.
pattern
grep
Further arguments passed on to grep. The value argument is rejected.
value
Returns a character vector.
DTSg, class, grep
# 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