| as.data.frame.dynet_animation | R Documentation |
Coerce an animation to a data frame
## S3 method for class 'dynet_animation'
as.data.frame(
x,
row.names = NULL,
optional = FALSE,
what = c("bins", "frames"),
...
)
x |
A |
row.names, optional |
As in |
what |
|
... |
Ignored. |
A plain data.frame.
if (requireNamespace("gifski", quietly = TRUE) &&
requireNamespace("cograph", quietly = TRUE)) {
dn <- dynet(school_contacts)
frames <- animate(dn, step = 6, window = 6, tween = 2)
as.data.frame(frames)
as.data.frame(frames, what = "frames")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.