Nothing
## File Name: univar_table_statistics.R
## File Version: 0.02
univar_table_statistics <- function(freq, values=NULL)
{
K <- length(freq)
if (is.null(values)){
values <- seq(0, K-1)
}
N <- sum(freq)
probs <- freq / N
M <- sum( probs * values)
SD <- sqrt( sum( probs * values^2) - M^2 )
#--- output
res <- list(N=N, M=M, SD=SD)
return(res)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.