1. Aprende
  2. /
  3. Cursos
  4. /
  5. Helsinki Open Data Science

Connected

Ejercicio

Selecting columns

Often it is convenient to work with only a certain column or a subset of columns of a bigger data frame. There are many ways to select columns of data frame in R and you saw one of them in the previous exercise: select() from dplyr*.

dplyr is a popular library for data wrangling. There is also a convenient data wrangling cheatsheet by RStudio to help you get started.

Instrucciones

100 XP
  • Access the dplyr library
  • Create object keep_columns
  • Use select() (possibly together with one_of()) to create a new data frame learning2014 with the columns named in keep_columns.
  • Look at the structure of the new dataset