美文网首页
安装 leafcutter和rstan这两个R包

安装 leafcutter和rstan这两个R包

作者: August________ | 来源:发表于2019-10-23 11:13 被阅读0次

    安装 leafcutter和rstan这两个R包

    安装rstan的R包

    > install.packages("rstan")
    ###报错
    downloaded 888 KB
    
    * installing *source* package ‘rstan’ ...
    ** package ‘rstan’ successfully unpacked and MD5 sums checked
    ** libs
    Error in .shlib_internal(args) : 
      C++14 standard requested but CXX14 is not defined
    * removing ‘/Share2/home/jiangmn/R/x86_64-redhat-linux-gnu-library/3.5/rstan’
    
    The downloaded source packages are in
        ‘/tmp/RtmpZurhdv/downloaded_packages’
    Warning message:
    In install.packages("rstan") :
      installation of package ‘rstan’ had non-zero exit status
    
    $ mkdir ~/.R
    $ vim ~/.R/Makevars
    CXX14FLAGS=-O3 -march=native -mtune=native -fPIC
    CXX14=g++
    ###指定gcc编译器版本7
    $ export PATH=/gcc/7.3.0/bin/:$PATH
    $ export LD_LIBRARY_PATH=/gcc/7.3.0/lib64/:$LD_LIBRARY_PATH
    
    • 重新安装rstan
    > install.packages("rstan")
    ted as a topic
        stanfit-method-pairs                    html  
        stanfit-method-plot                     html  
        stanfit-method-summary                  html  
        stanfit-method-traceplot                html  
        stanfit2array-method                    html  
        stanmodel-class                         html  
        stanmodel-method-gqs                    html  
        stanmodel-method-optimizing             html  
        stanmodel-method-sampling               html  
        stanmodel-method-vb                     html  
    *** copying figures
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    * DONE (rstan)
    
    The downloaded source packages are in
        ‘/tmp/RtmpodTNoo/downloaded_packages’
    
    • 安装rstan的R包成功

    安装需要rstantools

    > if (!require("devtools")) install.packages("devtools", repos='http://cran.us.rLoading required package: devtools
    > devtools::install_github("stan-dev/rstantools")
    *** copying figures
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    * DONE (rstantools)
    > 
        map_clusters_to_genes                   html  
        multiqq                                 html  
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    * DONE (leafcutter)
    > library(leafcutter)
    Loading required package: Rcpp
    
    

    相关文章

      网友评论

          本文标题:安装 leafcutter和rstan这两个R包

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