function (data, classn)
p = dim(data)
data1 = data[data[, p] == classn, ]
data1 = znorm(data1)
med1 = apply(data1, 2, median)
medm = as.matrix(rep(1, p)) %*% med1
data2 = data1 - medm
data2 = data2[, 1:(p - 1)]
means = sqrt(apply(data2^2, 1, sum))
Any scripts or data that you put into this service are public.
Add the following code to your website.
Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.