Other Verbs
Look at some common functions that can transform data to match our needs.
We'll cover the following
Here are some other useful data wrangling verbs:
select()
: This selects only a subset of variables/columns.rename()
: This renames variables/columns to have new names.top_n()
: This returns only the top n values of a variable.
Select variables
We’ve seen that the flights
data frame in the nycflights13
package contains 19 different variables. We can identify the names of these 19 variables by running the glimpse()
function from the dplyr
package:
Get hands-on with 1400+ tech skills courses.