todo/update.R

update <- function(aggr, curr, id) {
  cols <- colnames(curr)
  cols <- cols[cols != id]
  aggr[,cols] <- NA
  aggr[match(curr[,id], aggr[,id]), cols] <- curr[,cols]
  aggr
}
ElizabethAB/rutils documentation built on May 6, 2019, 3:24 p.m.