quantiletransform <- function(x){
xNoNA <- x[!is.na(x)]
ord <- order(xNoNA)
sorted <- sort(xNoNA)
nBelow <- rank(sorted, ties.method = "min")
p <- nBelow / (max(nBelow)+1)
q <- qnorm(p)
xTrans <- x
xTrans[!is.na(xTrans)][ord] <- q
return(xTrans)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.