A nD tour path with a scatterplot matrix (the default tour is a 4D tour; by setting `tour_path` to modify the dimension)
l_tour_pairs( data, scaling = c("data", "variable", "observation", "sphere"), tour_path = tourr::grand_tour(4L), numOfTours = 30L, interpolation = 40L, as.l_tour = TRUE, connectedScales = c("none", "cross"), linkingGroup, linkingKey, showItemLabels = TRUE, itemLabel, showHistograms = FALSE, histLocation = c("edge", "diag"), histHeightProp = 1, histArgs = list(), showSerialAxes = FALSE, serialAxesArgs = list(), color = "grey60", group = "color", start = NULL, parent = NULL, span = 10L, envir = parent.frame(), ... )
data | a data frame with numerical data only |
---|---|
scaling | one of 'variable', 'data', 'observation', 'sphere', or 'none' to specify how the data is scaled. See Details |
tour_path | tour path generator, defaults to 2d grand tour |
numOfTours | the number of tours |
interpolation | the steps between two serial projections. The larger the value is, the smoother the transitions would be. |
as.l_tour | return a |
connectedScales | Determines how the scales of the panels are to be connected.
|
linkingGroup | string giving the linkingGroup for all plots. If missing,
a default |
linkingKey | a vector of strings to provide a linking identity for each row of the
|
showItemLabels | TRUE, logical indicating whether its itemLabel pops up over a point when the mouse hovers over it. |
itemLabel | a vector of strings to be used as pop up information when the mouse hovers
over a point. If missing, the default |
showHistograms | logical (default FALSE) to show histograms of each variable or not |
histLocation | one "edge" or "diag", when showHistograms = TRUE |
histHeightProp | a positive number giving the height of the histograms as a proportion of the height of the scatterplots |
histArgs | additional arguments to modify the `l_hist` states |
showSerialAxes | logical (default FALSE) indication of whether to show a serial axes plot in the bottom left of the pairs plot (or not) |
serialAxesArgs | additional arguments to modify the `l_serialaxes` states |
color | vector with line colors. Default is given by |
group | only used for layers. As we scroll the bar, the layers are re-calculated. This argument is used to specify which state is used to set groups (i.e. "color", "linewidth", etc). |
start | projection to start at, if not specified, uses default associated with tour path |
parent | a valid Tk parent widget path. When the parent widget is
specified (i.e. not |
span | How many column/row occupies for each widget |
envir | the |
... | named arguments to modify the serialaxes states or layouts, see details. |
an l_tour_compound
object that one can query the loon
states
and a matrix projection vectors
l_pairs
, l_tour
if(interactive() && requireNamespace('tourr')) { # q is a `l_pairs` object q <- l_tour_pairs(olive[, -c(1:2)], color = olive$region) # query the matrix of projection vectors proj <- q["projection"] # query the `l_compound` widget lc <- l_getPlots(q) # pack the `density2d` layers layer_pack <- lapply(lc, function(w) l_layer_density2d(w)) #### set `as.l_tour = FALSE` # q is a `l_pairs` object q <- l_tour_pairs(tourr::flea[, 1:6], as.l_tour = FALSE, color = tourr::flea$species, showHistogram = TRUE, showSerialAxes = TRUE) # proj <- q["projection"] # Return a list of `NA` # query estimated matrix of projection vectors proj <- l_getProjection(q, tourr::flea[, 1:6]) }