```
standardize <- function(x) {
if (!is.matrix(x)) dim(x) <- c(length(x),1)
means <- colMeans(x)
x <- t(x) - means
vars <- sqrt(rowSums(x^2))
x <- t(x/vars)
return(list(x=x, center=means, scale=vars))
}
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.