##-------------------------------------------------------------
##
##-------------------------------------------------------------
ec2tds = function(ec, k = 0.64)
{
## range
if(k < 0.3 || k > 1) stop("Factor value: 0.3 <= k <= 1", call. = FALSE)
## equation 1
tds = ec * k
## out vector
if(is.data.frame(tds)) return(tds[,1])
return(tds)
}##end ec2tds
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.