I have a list of data frames like this:
dflist <- list(
X2013.11.14.Date = data.frame(replicate(2,sample(0:1,5,rep=TRUE))), X2013.11.14.Treatment = data.frame(replicate(2,sample(0:1,5,rep=TRUE))),
X2013.11.14.Value = data.frame(replicate(2,sample(0:1,5,rep=TRUE))), X2014.08.12.Date = data.frame(replicate(2,sample(0:1,5,rep=TRUE))),
X2014.08.12.Treatment = data.frame(replicate(2,sample(0:1,5,rep=TRUE))), X2014.08.12.Value = data.frame(replicate(2,sample(0:1,5,rep=TRUE))))
Within the list, each data frame is named with a date combined with a description like this:
names(dflist)
#[1] "X2013.11.14.Location" "X2013.11.14.Treatment" "X2013.11.14.Value" "X2014.08.12.Location"
#[5] "X2014.08.12.Treatment" "X2014.08.12.Value"
I would like to combine the individual data frames into new, larger data frames using the date portion of their names (e.g. X2013.11.14), keeping them within the list and if possible having the date as the list element name and the description (e.g. Location) as the column names. I'm not even sure what to try. Thanks.