How do I cross compile R packages for MacOS from a Linux environment?

后端 未结 2 1850
星月不相逢
星月不相逢 2021-01-14 13:32

I\'m running Linux and trying to compile an R package for use on a Mac. I could only find Linux->Windows and MacOS->Windows cross-compiling instructions. Does anybody know w

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-14 14:11

    Just a side note:

    While in R packages can be installed (from pre-compiled binary packages for all major platforms Windows, Mac, Linux) there are also tools for building packages from source as part of the installation process.

    Example for installation from source (more info):

    install.packages("Simpsons", type="source")
    

    Depending on the package (pure R or with some other language like C/C++ in it) and depending on the OS you use, you need additional tools to build the packages from source (e.g. Rtools for Windows, r-base-dev for Linux systems ...)

提交回复
热议问题