在Mac上为Windows构建R包

时间:2014-11-06 10:18:31

标签: r windows macos package-development

我在Mac下开发了一个软件包,并希望将其分发给我的同事。我可以在Mac下构建软件包,并可以在Mac下安装它,而且大多数都可以在Mac下安装它。我的同事Windows PC。其中一些是Windows 7,一些是Windows 8.所有这些都使用RStudio和3.1以上的不同R版本。

我现在有一台计算机存在一个大问题,无法弄清楚要做什么。

当我尝试安装软件包时,收到以下消息

install.packages("C:/Users/ncasasvi/Downloads/imbproteomicsr_0.1.6.tar.gz", repos = NULL, type = "source", lib="\\fs02/ncasasvi$/Dokumente/R/R-3.1.2/library")
Warning in install.packages :
 'lib = "\fs02/ncasasvi$/Dokumente/R/R-3.1.2/library"' is not writable
'\\fs02\ncasasvi$\Dokumente'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
'\\fs02\ncasasvi$\DOKUME~1\R\R-31~1.2' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
 running command '"//fs02/ncasasvi$/DOKUME~1/R/R-31~1.2/bin/x64/R" CMD INSTALL -l "\\fs02\ncasasvi$\Dokumente\R\win-library\3.1" "C:/Users/ncasasvi/Downloads/imbproteomicsr_0.1.6.tar.gz"' had status 1
Warning in install.packages :
 installation of package 'C:/Users/ncasasvi/Downloads/imbproteomicsr_0.1.6.tar.gz' had non-zero exit status

我现在复制了完整的软件包源代码,因此所有文件夹和文件都安装到Windows机器上,在那里安装了Rtools和devtools,并在windows机器上构建了同样的问题...

有没有办法找到更准确的错误信息,而不仅仅是状态错误?我没有进一步的想法。

我也感觉到我的文件赢得了建设者。它报告没有错误消息,但我也没有获得新的构建包#39;来自网站。

希望你们中的一些人有一些建议。提前谢谢!

修改

在开始时将路径更改为没有\\的某些内容并尝试删除所有其他错误消息后,我收到此消息:

> install.packages("C:/Users/ncasasvi/Downloads/imbproteomicsr_latest.tar.gz", repos = NULL, type = "source", lib=('U:/Dokumente/R/win-library/'))
Error: ERROR: no packages specified
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" CMD INSTALL -l "U:\Dokumente\R\win-library\" "C:/Users/ncasasvi/Downloads/imbproteomicsr_latest.tar.gz"' had status 1
Warning in install.packages :
  installation of package ‘C:/Users/ncasasvi/Downloads/imbproteomicsr_latest.tar.gz’ had non-zero exit status

介于两者之间,我取得了部分成功,但仍无法安装该软件包。这是两者之间的输出:

> install.packages("C:/Users/ncasasvi/Downloads/imbproteomicsr_latest (2).tar.gz", repos = NULL, type = "source")
Installing package into ‘\\fs02/ncasasvi$/Dokumente/R/win-library/3.1’
(as ‘lib’ is unspecified)
'\\fs02\ncasasvi$\Dokumente'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
* installing *source* package 'imbproteomicsr' ...
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
  no library trees found in 'lib.loc'
Error: loading failed
Execution halted
*** arch - x64
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
  no library trees found in 'lib.loc'
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing '\\fs02/ncasasvi$/Dokumente/R/win-library/3.1/imbproteomicsr'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" CMD INSTALL -l "\\fs02\ncasasvi$\Dokumente\R\win-library\3.1" "C:/Users/ncasasvi/DOWNLO~1/imbproteomicsr_latest (2).tar.gz"' had status 1
Warning in install.packages :
  installation of package ‘C:/Users/ncasasvi/DOWNLO~1/imbproteomicsr_latest (2).tar.gz’ had non-zero exit status

0 个答案:

没有答案