I\'ve been trying to do this with my data by looking at other posts, but I keep getting an error. My data new looks like this:
new
id year name
Your ddply effort looks good to me, but you referenced the original dataset in the callback function.
ddply(new,~id,function(x){x[which.max(new$year),]}) # should be ddply(new,.(id),function(x){x[which.max(x$year),]})