Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
f_computos <- function( p_data )
{
media <- mean( x = p_data, na.rm = T )
mediana <- median( x = p_data, na.rm = T )
moda <- unique( p_data )
moda <- moda[ which.max( x = tabulate( bin = match( x = p_data, table = moda ) ) ) ]
data.frame( Media = media
, Mediana = mediana
, Moda = moda
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment