Computer Science, asked by Anjalibansal7937, 1 year ago

Count the similar values in multiple columns based on one column in r using sqldf

Answers

Answered by malathipremi
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