Count the similar values in multiple columns based on one column in r using sqldf
Answers
Answered by
0
If your data is dataframe df with columns y and m
library(plyr)
counts <- ddply(df, .(df$y, df$m), nrow)
names(counts) <- c("y", "m", "Freq")
Similar questions