I have a data.frame as below, and i would like to find the frequency for each column.
data.frame ;
No Location Age Size Gender 1
Maybe your looking for lapply and table
lapply
table
> lapply(df[, -1], function(x) as.data.frame(table(x))) $Location x Freq 1 Asin 3 2 Trinidad 4 $Age x Freq 1 23 3 2 25 2 3 33 2 $Size x Freq 1 2 2 2 3 2 3 4 1 4 5 2 $Gender x Freq 1 1 3 2 2 4