R科研作图学习小组

http://group.keyangou.com/RGraph
组长: 管理员:
  • 访问次数:25982
  • 小组等级:9
  • 话题:593
  • 回答:39
  • 签到:429
  • 小组排名:
  • R2-04-第二阶段第四次作业

    blanking 发布于:2018.05.04

    library(RISmed)

    library(ggplot2)

    paper_count <- function(keyword = "p53", start_date = 2000, end_date= 2017)

    {

    count <- c()

        x<-1

        for (i in start_date:end_date){

            r <- EUtilsSummary(keyword, mindate = i, maxdate = i)

            count[x] <- QueryCount(r)

            x = x+1

        }

        data <- data.frame(year = start_date:end_date, count = count)

        data

    }

    tumor_heterogeneity <- paper_count("tumor heterogeneity", 2000, 2017)

    ggplot(tumor_heterogeneity, aes(x=year, y= count))+geom_bar(aes(fill=year), stat="identity")+xlab("year")+ylab("count")

     
    0条评论 158浏览 邀请回答
    沙发空缺中~

    小组告示

    科研狗 2012-2016 京ICP备16006621 科研好助手,专业的科研社交共享平台