| sparseAdjMat.to.NetInd | R Documentation |
Convert network represented by a sparse adjacency matrix into simcausal network IDs matrix (NetInd_k).
sparseAdjMat.to.NetInd(sparseAdjMat, trimKmax)
sparseAdjMat |
Network represented as a sparse adjacency matrix (S4 class object |
trimKmax |
Trim the maximum number of friends to this integer value. If this argument is not missing,
the conversion network matrix obtained from |
A named list with 3 items: 1) NetInd_k; 2) nF; and 3) Kmax.
1) NetInd_k - matrix of network IDs of dimension (n=nrow(sparseAdjMat),Kmax), where each row i consists of the network IDs (friends) for observation i.
Remainders are filled with NAs.
2) nF - integer vector of length n specifying the number of friends for each observation.
3) Kmax - integer constant specifying the maximum observed number of friends in input sparseAdjMat (this is the column dimension for the output matrix NetInd_k).
network; NetInd.to.sparseAdjMat; sparseAdjMat.to.igraph; igraph.to.sparseAdjMat;
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.