Using the select function and its helper functions in R to pick columns from a data frame (CC160)

Описание к видео Using the select function and its helper functions in R to pick columns from a data frame (CC160)

I have a data frame with 65 columns, but only want 4 of those. What am I to do? This is a great place to use the select function and its helper fuctions from the R dplyr package. Pat will show how to use the select function to get columns you want by their name along with the starts_with, ends_with, contains, and matches helper function when you aren't certain of the column names you want. We'll also see how you can use the select function to rename columns. We will practice these tools with a massive data frame that we downloaded from Our World in Data that describes COVID-19 vaccination rates by country and day.

In this episode, Pat uses #select from the #dplyr #R package in #Rstudio. The accompanying blog post can be found at https://www.riffomonas.org/code_club/....

Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at https://shop.riffomonas.org/youtube to get practice problems, tips, and insights.

If you're interested in taking an upcoming 3 day R workshop be sure to check out our schedule at https://riffomonas.org/workshops/


You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: https://www.riffomonas.org/minimalR/
General data: https://www.riffomonas.org/generalR/

0:00 Selecting columns from a data frame
2:55 Selecting for and against specific columns
5:19 Using helper functions with select
10:44 Rename columns with select
12:13 Cleaning up script

Комментарии

Информация по комментариям в разработке