library(dplyr)
node_rel <- data.frame(nodeID = 0,Weight = 0) #初始化
node_rel <- node_rel[-1,]
#循环node_del
for (m in 1:length(node_del))
{
node_del_tmp <- node_del[m]
node_rel <- rbind(node_rel,cbind(nodeID=dat1[which(dat1$nodeID1==node_del_tmp),2],Weight=0)) #追加node_del_tmp相连接的结点
}
node_rel <- summarise(group_by(node_rel, nodeID), count = n()) #group by
View(node_rel) #直接print显示不全