Please consider the following
请考虑以下事项
library(igraph)
id <- c("1","2","A","B")
name <- c("02 653245","03 4542342","Peter","Mary")
category <- c("digit","digit","char","char")
from <- c("1","1","2","A","A","B")
to <- c("2","A","A","B","1","2")
nodes <- cbind(id,name,category)
edges <- cbind(from,to)
g <- graph.data.frame(edges, directed=TRUE, vertices=nodes)
libra