Within the dplyr world, try:
select(iris,contains("Sepal"))
See the Selection section in ?select
for numerous other helpers like starts_with
, ends_with
, etc.
More Related Contents:
- select columns based on multiple strings with dplyr contains()
- Use dynamic name for new column/variable in `dplyr`
- data.table vs dplyr: can one do something well the other can’t or does poorly?
- Extract a dplyr tbl column as a vector
- Pass arguments to dplyr functions
- Using regex in R to find strings as whole words (but not strings as part of words)
- dplyr::select function clashes with MASS::select
- Replace specific characters within strings
- Sum across multiple columns with dplyr
- dplyr: nonstandard column names (white space, punctuation, starts with numbers)
- dplyr filter: Get rows with minimum of variable, but only the first if multiple minima
- dplyr mutate/replace several columns on a subset of rows
- dplyr: How to use group_by inside a function?
- case_when in mutate pipe
- Summarize all group values and a conditional subset in the same call
- regular expressions in base R: ‘perl=TRUE’ vs. the default (PCRE vs. TRE)
- Concatenate unique strings after groupby in R
- ignore NA in dplyr row sum
- Use grepl to search either of multiple substrings in a text [duplicate]
- Use filter in dplyr conditional on an if statement in R
- combine two data frames with all posible combinations
- dplyr / R cumulative sum with reset
- finding close match from data frame 1 in data fame 2
- Add a column with count of NAs and Mean
- grouped operations that result in length not equal to 1 or length of group in dplyr
- Error with select function from dplyr
- dplyr: put count occurrences into new variable [duplicate]
- Add row in each group using dplyr and add_row()
- Adding prefix or suffix to most data.frame variable names in piped R workflow
- How to replace certain values in a specific rows and columns with NA in R?