mode in r
# No in-built R function for this, create custom function:
getmode <- function(v) {
uniqv <- unique(v)
uniqv[which.max(tabulate(match(v, uniqv)))]
}
mode in r
# No in-built R function for this, create custom function:
getmode <- function(v) {
uniqv <- unique(v)
uniqv[which.max(tabulate(match(v, uniqv)))]
}
how to get the mode in r
library(DescTools)
Mode(name)
# make sure to inculde this libirary before you use the function
# install if necessary
# name is the dataset's name you want to get it's mode
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us