简体   繁体   English

在Mac上为Windows构建Building R软件包

[英]Building R package for windows on mac

Question: 题:

I am developing an R package. 我正在开发R包。 I have not yet submitted to CRAN (and it's not ready to at any rate). 我尚未提交给CRAN(而且尚未准备就绪)。 I want to send the package to friend for some preliminary testing (he's not a builder) and I just want to see if he can use a few features. 我想将软件包发送给朋友进行一些初步测试(他不是建筑商),我只想看看他是否可以使用一些功能。

On my Mac version of RStudio, I can generate binaries easily. 在Mac版本的RStudio上,我可以轻松生成二进制文件。 It creates a file called "iatgen_1.0.tgz" 它创建一个名为“ iatgen_1.0.tgz”的文件

Can my friend use that to install my early build on his windows machine? 我的朋友可以使用它在Windows机器上安装我的早期版本吗? Or do I need to do something to that file to make it usable for a windows user. 还是我需要对该文件进行某些操作以使其可用于Windows用户。 Let's assume I have NO access to a windows machine. 假设我无法访问Windows机器。 What can I do from my mac to make this package usable by windows users? 我如何从Mac上使Windows用户可以使用此软件包?

I am posting my comment as an (extended) answer because I think it will help you. 我将我的评论作为(扩展的)答案发布,因为我认为它将为您提供帮助。 When I built my package, I did not have access to Windows either and was suffering from the same issue. 构建软件包时,我也没有访问Windows的权限,并且遇到相同的问题。 I discovered the the Windows build service offered at http://win-builder.r-project.org/ and it worked great. 我发现了http://win-builder.r-project.org/上提供的Windows构建服务,它运行良好。 You'll need to do a few things before you send it in, and this is all explained on the site. 在发送之前,您需要做一些事情,这在网站上都有解释。

First, build your source package with R CMD build . 首先,使用R CMD build源包。 Next, check the package with R CMD check . 接下来,使用R CMD check包装。 If this succeeds, follow the rest of the instructions on the site and if all goes well they will send you a link to the temporary directory on their server where you can download the Windows build. 如果成功,请按照网站上的其余说明进行操作,如果一切顺利,他们将向您发送指向其服务器上临时目录的链接,您可以在其中下载Windows版本。 If all does not go well, Mr. Ligges will send you an email with the detailed issues so you can fix them and try again. 如果一切都不顺利,Ligges先生会给您发送电子邮件,其中包含详细的问题,因此您可以修复它们并重试。

Like I said, the service worked very well for me. 就像我说的那样,该服务对我来说非常有效。 The response was prompt and there were absolutely no problems. 响应迅速,绝对没有问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM