#loading libraries
library(RedditExtractoR)
library(visNetwork)
library(dplyr)
#data
c <- reddit_content("https://www.reddit.com/r/ethereum/comments/g5p6m6/mycrypto_integrates_defizap_to_earn_interest_on/")
v <- user_network(c)
#define nodes and edges
nodes <- v$nodes %>% rename("title"=.data$user)
edges <- v$edges %>% rename("width"=.data$weight) %>% mutate(arrows="to")
#create column with urls
nodes$url <- paste0("https://www.reddit.com/user/", nodes$title)
#network
visNetwork(nodes = nodes, edges = edges) #%>% visEvents(click = ???)
当用户单击节点时,我想让 url 在新的浏览器窗口中打开。我该如何做到这一点?提前致谢