I am trying to efficiently build a data frame that could represent the source of a frequency table in R.
Easy example:
A <- data.frame(Age=c(20,60,20,60), Health=c("Good","Good","Bad","Bad"), Frequency=c(53,13,23,31))
What I would like to have is a matrix that would have generated the above distribution. Is there a quick way to do it?