I want a simple count of the number of subjects in each condition of a study. The data look something like this:
subjectid cond obser variable 1234
Just to give you even more choice, you could also use tapply
tapply
tapply(a$subjectid, a$cond, function(x) length(unique(x))) 1 2 2 1