Utility function for PCGII inference results
sigs2mat.Rd
A utility function takes PCGII inference results as input and generates an adjacency matrix corresponding to the significant partial correlations
Arguments
- sigs
A dataframe of locations (row, col) of selected edges.
- P
A number, the number of nodes in the network.
Examples
edges=cbind.data.frame(row=c(1,2,3,1,6,2,1,6,1,4),
col=c(2,1,1,3,2,6,6,1,4,1)) # five edges
sigs2mat(sigs = edges, P = 6)
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 0 1 1 1 0 1
#> [2,] 1 0 0 0 0 1
#> [3,] 1 0 0 0 0 0
#> [4,] 1 0 0 0 0 0
#> [5,] 0 0 0 0 0 0
#> [6,] 1 1 0 0 0 0