繁体   English   中英

使用igraph仅绘制R中社交网络的特定日期的节点

[英]Plot only nodes of a specific date for a social network in R using igraph

我使用基于Twitter数据集的igraph在R中有一个社交网络图。 每个节点代表一个特定的推文,其中包含与之关联的日期戳。 有人可以给我R中的基本命令,只绘制在特定日期发生的那些节点吗?

以下是定义顶点的代码的一部分:

set.seed(1492)
tweets <- delete.vertices(netg, which(degree(netg)<1)) #remove isolates
V(rt_graph)$size <- centralization.degree(rt_graph)$res #degree 
centrality
cfg <- cluster_fast_greedy(rt_graph)
V(rt_graph)$community <- cfg$membership
plot(rt_graph, vertex.size=5, vertex.label=NA, main="igraph plot")

这应该工作假设日期是一个参数:

V(rt_graph)<-V(rt_graph)[V(rt_graph)$date=='<your date>']

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM