library(tidygraph)
Attaching package: ‘tidygraph’
The following object is masked from ‘package:igraph’:
groups
The following object is masked from ‘package:stats’:
filter
scopus <-
convert2df(file = "scientometrics.bib", # cargamos documentos
dbsource = "scopus",
format = "bibtex")
Converting your scopus collection into a bibliographic dataframe
Done!
Generating affiliation field tag AU_UN from C1: Done!
Creating the collaboration network
scopus_collab_net <-
scopus %>%
select(SR, AU) %>%
separate_rows(AU, sep = ";") %>%
group_by(SR) %>%
filter(n() > 1) %>% # Remove isolated nodes
expand(from = AU, to = AU) %>% # Matrix
filter(from != to) %>% # removed same names
ungroup() %>%
select(-SR) %>%
graph_from_data_frame(directed = FALSE) %>%
simplify() # Remove loops
write_graph(scopus_collab_net,
"scopus_collab_net.graphml",
"graphml")