This produces the output you want, though it is a two-step process.
# get data with some nice namesnews <- data.frame(date=c("2016-05-20","2016-05-19","2016-05-19"), lets=c("x","y","z"))data <- data.frame(date=c("2016-05-20","2016-05-21","2016-05-22"), nums=c(1,2,3))# combine observations with the same datenewsC <- aggregate(lets~date, data=news, FUN=paste, collapse="&&")merge(data, newsC, by="date", all=TRUE)
The first error you are getting is because you are not specifying a second data.frame in merge
.