| mtabulate | R Documentation |
Similar to tabulate that works on multiple vectors.
mtabulate(vects)
vects |
A |
Returns a data.frame with columns equal to
number of unique elements and the number of rows equal to the the original
length of the vector, list, or
data.frame (length equals ncols in
data.frame). If list of vectors is named
these will be the rownames of the dataframe.
Joran Elias and Tyler Rinker <tyler.rinker@gmail.com>.
https://stackoverflow.com/a/9961324/1000343
tabulate, counts2list
mtabulate(list(w=letters[1:10], x=letters[1:5], z=letters))
mtabulate(list(mtcars$cyl[1:10]))
## Dummy coding
mtabulate(mtcars$cyl[1:10])
mtabulate(CO2[, "Plant"])
dat <- data.frame(matrix(sample(c("A", "B"), 30, TRUE), ncol=3))
mtabulate(dat)
t(mtabulate(dat))
counts2list(mtabulate(dat))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.