> with(YourDataFrame, tapply(`Effective Date`, `RULE COLUMNS`, > function(x) x[which.max(x)]))
David pointed out that this will just return a table of dates. One work around is: do.call("rbind", by(DataFrame, DataFrame[, "RULE COLUMNS"], function(x) x[which.max(x[, "Effective Date"]), ])) but that is not very simple or elegant, and both David's and Bill's options seem superior. Josh ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.