View source: R/majority_vote.R
majority_vote | R Documentation |
Return the majority vote in a discrete valued vector
majority_vote(x)
x |
a vector coercible to a factor. |
The most common value in x, as a factor.
majority_vote(c(1,2,3,3,3))
majority_vote(factor(mtcars$cyl))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.