Skip to contents

Modification of the render_proj() function of tourr so that the half_range is calculated by max(sqrt(rowSums(data^2))) or can be provided as arg

Usage

render_proj_inter(
  data,
  prj,
  half_range = NULL,
  axis_labels = NULL,
  obs_labels = NULL,
  limits = 1,
  position = "center"
)

Arguments

data

matrix, or data frame containing numeric columns, should be standardized to have mean 0, sd 1

prj

projection matrix

axis_labels

of the axes to be displayed

obs_labels

labels of the observations to be available for interactive mouseover

limits

value setting the lower and upper limits of projected data, default 1

position

position of the axes: center (default), bottomleft or off

Value

list containing projected data, circle and segments for axes

Examples

library(tourr)
data(flea)
flea_std <- apply(flea[,1:6], 2, function(x) (x-mean(x))/sd(x))
prj <- basis_random(ncol(flea[,1:6]), 2)
p <- render_proj(flea_std, prj)