I have a list formed of 10 dataframes named MS1, ..., MS10. Each dataframe has a column 'DateTime' which is a POSIXct and a column 'Depth' (integer value). The dataframes are all of different lengths but all have overlapping DateTimes at some point.
To make simultaneous analysis and plotting of this data easier I would like to have all of these in a single dataframe with one column for DateTime and 10 columns named MS1, ..., MS10 holding the values previously held in the 'Depth' column for each dataframe. I would like to retain all values.
I am aware that there are various functions in R for joining merging dataframes (e.g. merge
, rbind
, join
) but I am unsure which method is the best to do this task?