The cumulative frequency distribution of a categorical variable can be checked using the cumsum () function in R language.
Example –
gender = factor(c(“f”,“m”,“m”,“f”,“m”,“f”))
y = table(gender)
cumsum(y)
Output of the above R code-
Cumsum(y)
f m
3 3