moveplot | R Documentation |
Create animated biplot on samples in a biplot
moveplot(bp, time.var, group.var, move = TRUE, hulls = TRUE, scale.var = 5)
bp |
biplot object from biplotEZ |
time.var |
time variable |
group.var |
group variable |
move |
whether to animate (TRUE) or facet (FALSE) samples, according to time.var |
hulls |
whether to display sample points or convex hulls |
scale.var |
scaling the vectors representing the variables |
bp |
Returns the elements of the biplot object |
plot |
An animated or a facet of biplots based on the dynamic frame. |
data(Africa_climate)
bp <- biplotEZ::biplot(Africa_climate, scaled = TRUE) |> biplotEZ::PCA()
bp |> moveplot(time.var = "Year", group.var = "Region", hulls = TRUE, move = FALSE)
bp |> moveplot(time.var = "Year", group.var = "Region", hulls = FALSE, move = FALSE)
if(interactive()) {
bp |> moveplot(time.var = "Year", group.var = "Region", hulls = TRUE, move = TRUE)}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.