animate_ts_ensemble: Show tour animation of the data points.

View source: R/animate_ts_ensemble.R

animate_ts_ensembleR Documentation

Show tour animation of the data points.

Description

Show tour animation of the data points.

Usage

animate_ts_ensemble(
  obj = NULL,
  X = NULL,
  method = NULL,
  edges = NULL,
  max_frames = Inf
)

Arguments

obj

The output from comp_tsout_ens or mv_tsout_ens functions.

X

The data matrix used as input to mv_tsout_ens (not needed if obj is output from comp_tsout_ens).

method

The dimension reduction method to apply before running the tour (if NULL tour on the full data space).

edges

Set to "all" to connect points by time index, "outlying" to connect tagged outliers to previous and following points.

max_frames

The maximum number of bases to generate in the grand tour (default is Inf).

Examples


set.seed(100)
n <- 600
x <- sample(1:100, n, replace=TRUE)
x[25] <- 200
x[320] <- 300
x2 <- sample(1:100, n, replace=TRUE)
x3 <- sample(1:100, n, replace=TRUE)
x4 <- sample(1:100, n, replace=TRUE)
X <- cbind.data.frame(x, x2, x3, x4)

animate_ts_ensemble(X = X, max_frames = 10)

out1 <- mv_tsout_ens(X, compr=2, fast=FALSE)
animate_ts_ensemble(out1, X, max_frames = 10)

X <- X/rowSums(X)
out2 <- comp_tsout_ens(X, ncomp = 3, compr=2, fast=FALSE)
animate_ts_ensemble(out2, method = "dobin", max_frames = 10)



composits documentation built on May 25, 2022, 9:11 a.m.