I have a data frame like this:
Expt Replicate
A 1
A 2
A 3
B 1
B 2
B 3
C 1
C 2
C 3
C 4
I want to return the number of replicates for each experiment. Like this:
Expt #Reps
A 3
B 3
C 4
This has got to be super simple, but I have tried some things like
ddply(df, Expt, .fun=max(Replicate))
with no luck. Please help.
another simple way:
Note: the 1st column is a
factorand this applies to any columns which arefactor