I know there is an easy way to do this...but, I can\'t figure it out.
I have a dataframe in my R script that looks something like this:
A B C 1.2
Here is a solution using the plyr package
plyr
plyr::ddply(df, .(A), summarize, num = length(A), totalB = sum(B))