| getNodesDataFrame {RGraph2js} | R Documentation |
data.frame from Adjacency matrix and properties
for specific nodesCreate Nodes data.frame from Adjacency matrix and properties
for specific nodes
getNodesDataFrame(A, nGlobal = NULL, nProp = NULL)
A |
signed weighted adjacency matrix |
nGlobal |
A |
nProp |
A |
A data.frame
Sylvain Gubian DL.RSupport@pmi.com
v <- c(0, 0, 1, 1, 0,
0, 0, 0, 0, 0,
-1, 0, 0, 1, 0)
a <- matrix(v, 3, 5)
colnames(a) <- LETTERS[1:5]
rownames(a) <- LETTERS[1:3]
nGlobal <- list(color="#dedeff")
nProp <- data.frame(shape=c('triangle', 'lozenge'))
rownames(nProp) <- c('C', 'E')
getNodesDataFrame(A=a, nGlobal=nGlobal, nProp=nProp)