R custom package install from file error

前端 未结 2 626
梦毁少年i
梦毁少年i 2021-01-13 18:41

I\'ve been working on a R package for a simulation project, on my computer at home I\'ve used RStudio to build and install it successfully. However on another machine at uni

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-13 19:19

    I had encountered a similar error a few days ago. It is because you are installing to this directory:

     '\\ueahome5/ressci17/yrq12edu/data/Documents/R/win-library/2.15/speEaR'
    

    I guess it is connected to a network drive. What you should do is go to that network drive and copy the address explicitly like

     'M:/ressci17/yrq12edu/data/Documents/R/win-library/2.15/'
    

    And then use it to specify the library location when you install. For example:

    install.packages("speEaR_1.0.tar.gz", repos=NULL, type="source",lib='U:/ressci17/yrq12edu/data/Documents/R/win-library/2.15/')
    

    Or try devtools , unpack your tar ball and do something like:

    library(devtools)
    has_devel() ## check if your Rtools are properly installed
    check('speEaR')
    ##build('speEaR')
    install("speEaR",args='-l "U:/ressci17/yrq12edu/data/Documents/R/win-library/2.15/"')
    

    This is how I solved my problem.

提交回复
热议问题