美文网首页
【R语言 常用】

【R语言 常用】

作者: 佳奥 | 来源:发表于2023-01-02 16:51 被阅读0次

    这里是佳奥!这一部分是R语言常用的命令。

    1、R包配置

    if (!requireNamespace("BiocManager", quietly = TRUE))
     install.packages("BiocManager") 
    BiocManager::install(c("GSEABase","GSVA","clusterProfiler" ),ask = F,update = F)
    BiocManager::install(c("GEOquery","limma","impute" ),ask = F,update = F)
    BiocManager::install(c("org.Hs.eg.db","hgu133plus2.db" ),ask = F,update = F)
    
    安装后:
    options()$repos
    install.packages('WGCNA')
    install.packages(c("FactoMineR", "factoextra"))
    install.packages(c("ggplot2", "pheatmap","ggpubr"))
    library("FactoMineR")
    library("factoextra")
    
    library(GSEABase)
    library(GSVA)
    library(clusterProfiler)
    library(ggplot2)
    library(ggpubr)
    library(hgu133plus2.db)
    library(limma)
    library(org.Hs.eg.db)
    library(pheatmap)
    

    2、工作目录

    ##现在不用了,都是生成R Project文件,直接打开即可
    swd("D:/programe/R Data")
    

    3、文件存储和导入

    保存
    save(b, file = 'b_input.Rdata')
    读取
    load(file='b_input.Rdata')
    

    4、Error: could not find function ''%>%''

    library(dplyr)
    

    5、could not find function "read_csv"

    library(readr)
    

    6、could not find function "str_remove"

    library(tidyverse)
    

    相关文章

      网友评论

          本文标题:【R语言 常用】

          本文链接:https://www.haomeiwen.com/subject/naxkcdtx.html