Description Usage Arguments Examples
Searches through all variable names and returns all that match a search term, using regular expressions.
1 | get_matchvars(d, pattern)
|
d |
The full data frame |
pattern |
The pattern to match in the variable name |
1 2 3 4 | # Get all variable names including "Q6_"
get_matchvars(survey, "Q6_")
# Create data frame with only Q6 variables
new_data <- survey[get_matchvars(survey, "Q6_")]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.