Skip to content

Instantly share code, notes, and snippets.

@daijiang
daijiang / Data_animate_gganimate.R
Last active June 27, 2019 18:41 — forked from djj4tree/Data_animate_gganimate.R
Animate tree data collection gganimate R code
# snippet of code to animate data in order of collection
# a little bit of data to show how it works
df <- structure(list(sp = structure(c(2L, 2L, 3L, 1L, 1L, 3L, 1L, 3L,
2L, 3L, 1L, 3L, 1L, 1L, 3L, 3L, 1L, 2L, 3L, 3L, 1L, 3L, 3L, 1L,
3L, 3L, 3L, 3L, 1L, 3L, 1L, 1L, 3L, 2L, 3L, 2L, 1L, 1L, 2L, 2L,
1L, 3L, 1L, 2L, 1L, 2L, 3L, 3L, 1L, 2L, 2L, 3L, 2L, 3L, 3L, 2L,
3L, 3L, 2L, 2L, 3L, 2L, 1L, 1L, 3L, 2L, 3L), .Label = c("D",
"O", "P"), class = "factor"), dbh = c(19.36, 20.74, 10.13, 10.47,
10.34, 14.22, 10.17, 22.91, 6.58, 7.93, 14.44, 6.67, 20.93, 7.16,