Skip to content

Instantly share code, notes, and snippets.

View rathko's full-sized avatar

Radek Maciaszek rathko

View GitHub Profile
environment:
VIRTUAL_HOST: example.com
LETSENCRYPT_HOST: example.com
LETSENCRYPT_EMAIL: youremail@example.com
library(digest)
getSymbols(c("^VIX"))
vix = VIX[,"VIX.Adjusted"]
vix.hash = apply(vix, 2, function(col) sapply(col, digest, algo="md5"))
vix.hash = apply(vix.hash, 2, function(col) { as.numeric(paste("0x", col, sep="")) / 15e+38 } )
old.par <- par(mfrow=c(1, 2))
plot(vix, ylim=c(10, 120), ylab='')
plot(vix.hash, ylim=c(0, 1), ylab='')
par(old.par)