distance2mahalanobis <- function(formula, data, ...) {
X <- model.matrix(formula, data)
# Placeholder where real work is done on a unit by unit basis
distance <- rep(1, nrow(X))
return(list(model = NULL, distance = distance))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.