x <- andrews(p = 4)
dat <- iris[, -5]
proj <- t(as.matrix(dat) %*% x$matrix)
matplot(x$vector, proj,
type = "l", lty = 1,
col = "black",
xlab = "x",
ylab = "Andrews coefficients",
main = "Iris")
Run the code above in your browser using DataLab