col_subset | R Documentation |
col_subset() is a wrapper around m[, str_detect(colnames(m), pattern)]
col_subset(m, pattern, negate = FALSE)
m |
Input matrix or data frame. |
pattern |
Pattern to look for. The default interpretation is a regular expression, as described in stringi::stringi-search-regex. Control options with 'regex()'. |
negate |
If 'TRUE', return non-matching columns. |
Vectorised over colnames('m') and 'pattern'
A matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.