Nothing
## -*- truncate-lines: t; -*-
drawdown <- function(v, relative = TRUE, summary = TRUE) {
cv <- cummax(v)
d <- cv - v
if (relative)
d <- d/cv
if (summary) {
troughTime <- which.max(d)
peakTime <- which.max(v[seq_len(troughTime)])
list(maximum = max(d),
high = v[peakTime],
high.position = peakTime,
low = v[troughTime],
low.position = troughTime)
} else
d
}
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.