The following commands are for making a network animation (moving networks) using R packages statnet and ndtv.
Load packages
library(statnet)
library(ndtv)
library(rio)
library(knitr)
Load data
riv <- import("C:/Users/bomim/Documents/website-hugo/content/post/toyriv.dta")
vtx <- import("C:/Users/bomim/Documents/website-hugo//content/post/node.