View source: R/animate_ts_ensemble.R
animate_ts_ensemble | R Documentation |
Show tour animation of the data points.
animate_ts_ensemble( obj = NULL, X = NULL, method = NULL, edges = NULL, max_frames = Inf )
obj |
The output from |
X |
The data matrix used as input to |
method |
The dimension reduction method to apply before running the tour (if |
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). |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.