sm2el: Sociomatrix to edgelist

View source: R/sm2el.R

sm2elR Documentation

Sociomatrix to edgelist

Description

Construction of an edgelist from a sociomatrix

Usage

sm2el(sm,directed=TRUE)

Arguments

sm

a sociomatrix with possibly valued relations

directed

if TRUE, only use the upper triangular part of the matrix to enumerate edges

Value

an edglist

Author(s)

Peter Hoff

Examples


Y<-matrix(rpois(10*10,.5),10,10) ; diag(Y)<-NA
E<-sm2el(Y) 
el2sm(E) - Y 


amen documentation built on May 29, 2024, 9:58 a.m.