gden computes the density of the graphs indicated by g in collection dat, adjusting for the type of graph in question.
gden(dat, g=NULL, diag=FALSE, mode="digraph", ignore.eval=FALSE)g==NULL (the default), density is calculated for all graphs in dat. diag is FALSE by default. mode is set to "digraph" by default. ignore.eval==FALSE. The number of possible ties is determined by the graph type (and by diag) in the usual fashion.
Where missing data is present, it is removed prior to calculation. The density/graph mean is thus taken relative to the observed portion of the graph.
#Draw three random graphs
dat<-rgraph(10,3)
#Find their densities
gden(dat)
Run the code above in your browser using DataLab