Simple play icon Course
Skills

Merging Data Sources with R 3

by Dan Tofan

Learn how to merge data with R. How do you merge values into vectors? How do you merge vectors into data frames? How do you join data frames? See how to use base R and dplyr to do left, right, and full outer joins with plenty of examples.

What you'll learn

In your R data science projects, you need very often to work with data which is spread out across multiple data sources. For example, given two separate data sets on products and their sales, how can you merge them into a new data set? In this course, Merging Data Sources with R, you will gain the ability to merge data from different sources in a controlled way that enables you to keep only the data you need. First, you will learn to merge vectors, which includes using the paste() and append() methods. Next, you will discover how to join data sets with the merge() function, which includes left, inner, right and full outer joins, on data frames that can have one-to-one, one-to-many, or many-to-many relationships. Finally, you will explore how to join data sets with the dplyr package, which covers the previous joins plus anti and semi joins. When you are finished with this course, you will have the skills and knowledge of merging data from different sources, needed to do data wrangling with R.

About the author

Dan started programming decades ago on a Spectrum clone and started his professional programming career in 2003. Eager to learn, Dan moved to Netherlands to study at the University of Groningen. Now, Dan is proud of his PhD thesis on decision making and knowledge acquisition in software architecture, and about a dozen publications with hundreds of citations. Dan used Microsoft technologies for many years, but migrated gradually to Python, Linux and AWS, to learn more of the computing world. Cur... more

Ready to upskill? Get started