Session Ready
Exercise

Pipeline function to merge datasets

Five simplified data.tables like those from the previous exercise are available in your session. You can use ls(pattern = "DT") to list them out. In this exercise, we'll merge them together into a single dataset.

data.table supports merging that is intuitive and fast. However, once you have more than two or three datasets, writing those manual merge() statements gets really tedious.

You can use Reduce() to write a function that will work for however many datasets you provide!

Instructions 1/2
undefined XP
  • 1
  • 2
  • Use merge() to combine cobaltDT and copperDT into a new data.table called mergedDT. Merge on close_date and perform an outer join using cobaltDT as the "x" table.