If a function is provided, it will be applied to each column of the dataframe and must return a logical; those with resulting value TRUE will be returned as a character vector.
standard_column_format(cols, dataframe)
cols | a vector or function. If logical / numeric / character vector,
it will attempt to find those columns matching these values. If |
---|---|
dataframe | a reference dataframe. Necessary for computing the
column names if a numeric or logical vector is specified for |
standard_column_format(c(1,5), iris) # c('Sepal.Length', 'Species')#> [1] "Sepal.Length" "Species"standard_column_format(c(TRUE,FALSE,FALSE,FALSE,TRUE), iris) # c('Sepal.Length', 'Species')#> [1] "Sepal.Length" "Species"standard_column_format('Sepal.Length', iris) # 'Sepal.Length'#> [1] "Sepal.Length"standard_column_format(list(is.numeric, c(1,5)), iris) # 'Sepal.Length'#> [1] "Sepal.Length"# TODO: (RK) Explain except()