Skip to content

Instantly share code, notes, and snippets.

View djj4tree's full-sized avatar

Dan Johnson djj4tree

View GitHub Profile
@djj4tree
djj4tree / Data_animate_gganimate.R
Created June 27, 2019 07:12
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,