0
我有数据帧的有40802个基因名称的列表,我有14000条信息的数据帧。文章信息包含文章,摘要,日,月,年。计数频率和创建情节
我已经改变了日期为正常格式,抽象的人物。
我想有X在时间上的情节,基因名字的频率出现在抽象的。 EG
| Date | Gene Name | Frequency |
|------------|-----------|-----------|
| 2017-03-20 | GAPDH | 5 |
| 2017-03-21 | AKT | 6 |
基本上,我想知道最经常刊登在过去100天内的基因名称,并有一个时间表,看看说genenames的演变。像趋势一样。
library(RISmed)
##Research the query - can be anything relevant to protein expression.
##Multiple research not tested yet
search_topic <- 'protein expression'
##Evaluate the query with reldate = days before today, retmax = maximun number of returned results
search_query <- EUtilsSummary(search_topic, retmax=15000, reldate = 100)
##explore the outcome
summary(search_query)
##get the ids for tall the queries to get the articles
QueryId(search_query)
##get all the records associated with the ID - THIS TAKES LOOONG TIME
records<- EUtilsGet(search_query)
##Analyze the structure
str(records)
summary(records)
##Create a data frame with article/abstract/date
pubmed_data <- data.frame('Title'=ArticleTitle(records),'Abstract'=AbstractText(records),
"Day"=DayPubmed(records), "Month" = MonthPubmed(records), "Year"=YearPubmed(records))
##explore the data
head(pubmed_data,1)
##gene names
genename <- read.csv("genename.csv", header = T, stringsAsFactors = F)
##remove any NA tittles
pubmed <-pubmed_data[-which(is.na(pubmed_data$Title)), ]
##Coerce the date to YYYY-MM-DD
pubmed$Date <- as.Date(paste(pubmed$Day , pubmed$Month , sep = ".") , format = "%d.%m")
我读了很多,无法弄清楚如何找到genemane [1,1]内pubmed$Abstract
, 和时间计数就出现的时间。 制作的情节,其中X是过去100天,行PROT将是genenames, 的频率和传说将是genename。所以可以观察到一种趋势。
我会很感激的任何想法如何可以做到这一点。
我试过tm
,并尝试了很多不同的东西,但仍然碰壁。我的观念错了吗?