turnOver = function(wts,wtsInit = NULL,digits = NULL)
{
if(is.null(wtsInit)) {
n = length(wts)
wtsInit = rep(1/n,n)}
to = sum(abs(wts-wtsInit))
if(is.null(digits)) {list(turnover = to)}
else {to = round(to,digits)
list(turnover = to)}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.