Last chance! 50% off unlimited learning
Sale ends in
lower.tri.remove(dat, remove.val=NA)
lower.tri.remove
is simply a convenient way to apply g[lower.tri(g)]<-remove.val
to an entire stack of adjacency matrices at once.lower.tri
, upper.tri.remove
, diag.remove
#Generate a random graph stack
g<-rgraph(3,5)
#Remove the lower triangles
g<-lower.tri.remove(g)
Run the code above in your browser using DataLab