从PubMed文章作者列表创建顶点和边列表

时间:2017-11-18 21:03:55

标签: r graph igraph pubmed

我试图通过构建顶点列表数据帧,通过RISmed包从PubMed获取文章来构建R igraph图,如下所示:

Name              Count
Cardone L         22
...               ...
Sassone-Corsi P   6
...               ...

和相应的(无向)边列表

V1        V2              NumberOfCoAuthorships
Cardone L Sassone-Corsi P 4

以下是我提取的数据:

#install.packages("RISmed")
library(RISmed)
limit = 100
query = "Cardone L[AUTH]"
# build the Eutils object
search_query <- EUtilsSummary(query, type="esearch",db = "pubmed",mindate=1980, maxdate=2016, retmax=limit)
# now let's fetch authors
auths<-Author(EUtilsGet(search_query))
# to extract all the names in the LastName Initials format
Authors<-sapply(auths, function(x)paste(x$LastName,x$Initials))

但我真的没有关注如何从字符串的作者列表中为未来的igraph图形对象构建边缘和顶点数据帧

> head(Authors,3)
[[1]]
[1] "Cardone L"

[[2]]
 [1] "Carrella D"     "Manni I"        "Tumaini B"      "Dattilo R"      "Papaccio F"     "Mutarelli M"   
 [7] "Sirci F"        "Amoreo CA"      "Mottolese M"    "Iezzi M"        "Ciolli L"       "Aria V"        
[13] "Bosotti R"      "Isacchi A"      "Loreni F"       "Bardelli A"     "Avvedimento VE" "di Bernardo D" 
[19] "Cardone L"     

[[3]]
[1] "Ventre S"      "Indrieri A"    "Fracassi C"    "Franco B"      "Conte I"       "Cardone L"    
[7] "di Bernardo D"

感谢您的帮助

0 个答案:

没有答案