How to install R-packages not in the conda repositories?

后端 未结 2 1767
花落未央
花落未央 2020-12-16 05:32

I am using Anaconda to manage my R-installation. It works great for packages available in the R-channels provided by Anaconda, but I am having troubles installing packages n

相关标签:
2条回答
  • 2020-12-16 06:16

    In the end, I got around the rl_event_hookproblems by following the approach recommended here and symlinking anaconda's libreadline to the system one:

    mv ~/anaconda3/lib/libreadline.s.6.2 ~/anaconda3/lib/libreadline.s.6.2.bak
    ln -s /usr/lib/libreadline.so.6.3 ~/anaconda3/lib/libreadline.s.6.2
    

    I am still having troubles installing some dependency heavy R-packages due to failure to load shared objects when using install.packages() from withing R. However, simpler packages work fine and I can get most of the dependency heavy packages from anacondas R-repositories.

    0 讨论(0)
  • 2020-12-16 06:24

    Detailed post on managing packages that are and are not in Anaconda R: http://ihrke.github.io/conda.html

    Essentially is using commands:

    conda skeleton cran <package_name>
    conda build <package_name>
    

    If the package has dependencies that are also not in Anaconda:

    conda skeleton cran <dependency1>
    conda skeleton cran <dependency2>
    conda build <package_name>
    

    Essentially I would agree with this post in saying that I don't understand how install.packages() works with Anaconda. What I seem to see is that Anaconda creates a R environment where all the packages installed from install.packages() are kept.

    Whenever I am working in Jupyter with R, I use this environment and am able to access all the packages that I have installed with install.packages()

    0 讨论(0)
提交回复
热议问题