Running examples in ‘lolog-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: createLatentOrderLikelihood
> ### Title: Creates a probability model for a latent ordered network model
> ### Aliases: createLatentOrderLikelihood
> 
> ### ** Examples
> 
> # See the methods of the objects returned by this function
> UndirectedLatentOrderLikelihood
C++ class 'UndirectedLatentOrderLikelihood' <0x56538e3477c0>
Constructors:
    UndirectedLatentOrderLikelihood(lolog::Model<lolog::Undirected>)

Fields: No public fields exposed by this class

Methods: 
     Rcpp::RObject_Impl<Rcpp::PreserveStorage> generateNetwork()  
           
     Rcpp::RObject_Impl<Rcpp::PreserveStorage> getModel()  
           
     void setModel(lolog::Model<lolog::Undirected>)  
           
     void setThetas(std::vector<double, std::allocator<double> >)  
           
     Rcpp::List variationalModelFrame(int, double)  
           
     Rcpp::List variationalModelFrameWithFunc(int, double, Rcpp::Function_Impl<Rcpp::PreserveStorage>)  
           
> DirectedLatentOrderLikelihood
C++ class 'DirectedLatentOrderLikelihood' <0x56538e347920>
Constructors:
    DirectedLatentOrderLikelihood(lolog::Model<lolog::Directed>)

Fields: No public fields exposed by this class

Methods: 
     Rcpp::RObject_Impl<Rcpp::PreserveStorage> generateNetwork()  
           
     Rcpp::RObject_Impl<Rcpp::PreserveStorage> getModel()  
           
     void setModel(lolog::Model<lolog::Directed>)  
           
     void setThetas(std::vector<double, std::allocator<double> >)  
           
     Rcpp::List variationalModelFrame(int, double)  
           
     Rcpp::List variationalModelFrameWithFunc(int, double, Rcpp::Function_Impl<Rcpp::PreserveStorage>)  
           
> 
> # A Barabasi-Albert type graph model with 1000 vertices
> el <- matrix(0, nrow=0, ncol=2)
> net <- new(UndirectedNet, el, 1000L)
> lolik <- createLatentOrderLikelihood(net ~ preferentialAttachment(), theta=1)
> banet <- lolik$generateNetwork()$network # generate a random network from the model
> degrees <- banet$degree(1:1000)
> hist(degrees, breaks=100) # plot the degree distribution
> order <- banet[["__order__"]] # The vertex inclusion order
> 
> # Earlier nodes have higher degrees
> library(ggplot2)
> qplot(order, degrees, alpha=I(.25)) + geom_smooth(method="loess")
Error in grid.Call.graphics(C_setviewport, vp, TRUE) : 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
Calls: <Anonymous> ... lapply -> FUN -> push.vp.viewport -> grid.Call.graphics
Execution halted