theilInd <-
function(samps){
theils<-c()
for(i in samps){
t.i<-i/mean(samps)*log(i/mean(samps))
theils<-c(theils,t.i)
}#end for i
t.out<-sum(theils)/length(theils)
#t.out<-t.out/log(length(theils))
return(t.out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.