Specifying network and VAR models in R