| mimic_gif | R Documentation |
Create an animation to show datasets that mimic a target dataset x2.
mimic_gif( x, x2, idempotent = TRUE, theme_name = "classic", ease = "cubic-in-out", transition_length = 3, state_length = 1, wrap = TRUE )
x |
A list of input datasets. Each one must be suitable argument
|
x2 |
A suitable argument |
idempotent |
A logical vector that provides the argument of the same
names to |
theme_name |
A character scalar used to set the
|
ease |
A character scalar passed to |
transition_length, state_length, wrap |
Arguments passed to
|
For this function to work the packages
ggplot2 and
gganimate must be installed.
An object of class c("gganim", "gg", "ggplot") with an additional
attribute new_data that is a data frame with 3 variables, x, y and
dataset containing the datasets output from mimc.
The returned object may be displayed using by typing its name,
e.g., anim or saved as a GIF file using
anim_save, e.g.,
gganimate::anim_save("anscombe.gif", anim).
mimic to modify a dataset to share sample summary statistics
with another dataset.
input_datasets: input1 to input8 for some input datasets
of the same size as those in Anscombe's quartet.
# Create 8 datasets that mimic Anscombe's first dataset x <- list(input1, input2, input3, input4, input5, input6, input7, input8) anim <- mimic_gif(x, anscombe1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.