1. 학습
  2. /
  3. 강의
  4. /
  5. Programming with dplyr

Connected

연습 문제

Looking for matches

You can use the matches() function inside of select() to return columns with names that match a particular string or regular expression. This can be helpful if the columns you want to choose do not fall immediately after each other but follow a particular pattern in their names. You'll work with the imf_data to return different subsets of columns according to patterns found with a string argument to matches().

지침 1/3

undefined XP
  • 1
    • Pick country, year, and columns that have "perc" or "rate" in their names.
  • 2
    • Pick country, year, and columns that start with "gov" using a regular expression instead of using starts_with().
  • 3
    • Pick country, year, and columns ending with "gdp" using a regular expression instead of using ends_with().