l_getProjection: Query the matrix of projection vectors

View source: R/l_getProjection.R

l_getProjectionR Documentation

Query the matrix of projection vectors

Description

Query the matrix of projection vectors

Usage

l_getProjection(target, data)

Arguments

target

A object returned by l_tour

data

Original data set

Value

a matrix of projection vectors

Examples

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']))
}

loon.tourr documentation built on May 29, 2024, 10:09 a.m.