I have a data frame, donorInfo, with donor information:
donorInfo
id giftdate giftamt 002 2001-01-05 25.00 033 2001-05-08 5
try something like this:
donorInfo$numUnique<-sapply(seq(nrow(donorInfo)), function(rn){ length(unique(donorInfo$id[seq(rn)])) })
Not the most efficient solution no doubt, but it should work.