问题描述
我在Linux上创建了R软件包(并且在Linux上可以使用),但是无法在Windows上使用相同的软件包.
I created an R package on Linux (and it is working on Linux), but I can't make the same package work on Windows.
我试图做的(也许有点愚蠢)是将tar.gz转换为Zip文件并从R GUI安装.
What I tried to do (maybe it was a bit foolish) was to convert the tar.gz into a Zip file and to install it from the R GUI.
但是,当我加载程序包库("myPackage")时,我收到以下消息:
However, when I load the package library("myPackage") then I get the following message:
Error in library("myPackage") :
there is no package called 'myPackage'
我应该尝试使用R工具直接从Windows生成软件包吗?
Should I try to build the package directly from Windows with the R tools?
推荐答案
要在Windows上构建R包,请从以下位置下载工具:
http://cran.r-project.org/bin/windows/Rtools/
并按照
上的说明进行操作 http://robjhyndman.com/researchtips/building-r-packages-for -windows/
To build an R package on Windows, download the tools at
http://cran.r-project.org/bin/windows/Rtools/
and follow the instructions at
http://robjhyndman.com/researchtips/building-r-packages-for-windows/
这篇关于为Windows创建R包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!