calc_drawdownRate = function(calls, commits, lag = T)
{
data = cbind(calls, commits)
undrawn = cumsum(data[, 2] - data[, 1])
if(lag)
res = data[, 1]/lag(undrawn)
else
res = data[, 1]/undrawn
names(res)[1] = "DrawdownRate"
return(res)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.