% Generated by roxygen2: do not edit by hand % Please edit documentation in R/animate_tidyr.R \name{animate_gather} \alias{animate_gather} \title{Animates the gather function} \usage{ animate_gather(w, key, value, ..., export = "gif", detailed = TRUE) } \arguments{ \item{w}{a data_frame in the wide format} \item{key}{the key} \item{value}{the value} \item{...}{further arguments passed to gather, static_plot, or animate_plot} \item{export}{the export type, either gif, first or last. The latter two export ggplots of the first/last state of the gather function} \item{detailed}{boolean value if the animation should show one step for each key value} } \value{ a gif or a ggplot } \description{ Animates the gather function } \examples{ wide <- data_frame( year = 2010:2011, Alice = c(105, 110), Bob = c(100, 97), Charlie = c(90, 95) ) animate_gather(wide, "person", "sales", -year, export = "first") animate_gather(wide, "person", "sales", -year, export = "last") \donttest{ animate_gather(wide, "person", "sales", -year, export = "gif") # if you want to have a less detailed animation, you can also use animate_gather(wide, "person", "sales", -year, export = "gif", detailed = FALSE) } }