Main Profile

At A Glance

R15. Merging Multiple Data Frames (Econometrics in R)

In this video, I demonstrate how to use the merge command (just with the basic options) to merge two data frames. I also show how to use a function that merges multiple data frames together. The function multmerge() also reads the data in from source files. Maybe you will find this function useful. The code for the multmerge() function is available at my econometrics blog here: http://novicemetrics.blogspot.com/2011/04/merging-multiple-data-files-into-one.html I post additional resources on my R tutorials at my econometrics blog, as well as embedding the videos from this series. The FRED data are available here: http://research.stlouisfed.org/fred2/ S&P500 Data? For matching daily observations to monthly (where daily observations do not necessarily occur on the first day of the month), you may want a function that coerces the first observation of the month to be on the first day (to allow for easy matching). I wrote a function that does this. This is a little idiosyncratic, but maybe you'll find it useful. http://novicemetrics.blogspot.com/2011/04/dates-in-r-and-first-day-of-month.html
Length: 08:05

Contact

Questions about R15. Merging Multiple Data Frames (Econometrics in R)

Want more info about R15. Merging Multiple Data Frames (Econometrics in R)? Get free advice from education experts and Noodle community members.

  • Answer

Ask a New Question