View source: R/l_getProjection.R
l_getProjection | R Documentation |
Query the matrix of projection vectors
l_getProjection(target, data)
target |
A object returned by |
data |
Original data set |
a matrix of projection vectors
if(interactive()) {
dat <- iris[,-5]
p <- l_tour(dat, color = iris$Species,
as.l_tour = FALSE)
# scroll the bar
proj <- l_getProjection(p, dat)
projected_object <- as.matrix(dat) %*% proj
# it will not be exactly the same
plot(projected_object[,1], projected_object[,2],
col = hex12tohex6(p['color']))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.