Selecting and renaming columns | Data untangled: transforming and cleaning data with R (lesson 1)
Channel: The GRAPH Courses
Date: 2023-03-01

👋 LESSON MATERIALS 🛑

Get the data, scripts, PDF notes and quizzes for this lesson from our website: 
https://thegraphcourses.org/courses/data-untangled-beta/topics/select-rename/

If this is your first time coding along with us, watch this quick video to see how it works: https://youtu.be/xTsdNpeY2ak

Chapters:
00:00 Intro 
01:25 The Yaounde COVID-19 dataset
02:47 Introducing select()
08:36 Excluding columns with !
11:55 Helper functions for select()
18:18 Change column names with rename()
21:03 Wrap Up

Learning objectives:
- You can keep or drop columns from a dataframe using the dplyr::select() function from the {dplyr} package.
- You can select a range or combination of columns using operators like the colon (:), the exclamation mark (!), and the c() function.
- You can select columns based on patterns in their names with helper functions like starts_with(), ends_with(), contains(), and everything().
- You can use rename() and select() to change column names.


----------------

And follow us on social media to get the latest updates!
Twitter: https://twitter.com/theGRAPHnetwork
LinkedIn: https://www.linkedin.com/company/the-graph-network