我無法在Windows上爲R構建虛擬測試包。 用於測試目的,在R端子,我輸入:爲Windows編譯R-pkakge -ERROR:編譯包xxx失敗
a=rnorm(10)
package.skeleton("pkgtest")
然後我運行該虛擬包R CMD check pkgtest
並得到了錯誤,如
* using R version 2.12.0 (2010-10-15)
* using platform: i386-pc-mingw32 (32-bit)
* using session charset: ISO8859-1
* checking for file 'pkgtest/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'pkgtest' version '1.0'
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking for executable files ... OK
* checking whether package 'pkgtest' can be installed ... ERROR Installation failed.
編輯,完整的日誌文件:
* installing *source* package 'pkgtest' ...
** libs
cygwin warning:
MS-DOS style path detected: C:/R/R-212~1.0/etc/i386/Makeconf
Preferred POSIX equivalent is: /cygdrive/c/R/R-212~1.0/etc/i386/Makeconf
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
ERROR: compilation failed for package 'pkgtest'
`* removing 'C:/DOCUME~1/xxxx'`
就是這樣。我在數據文件夾中有一個數據a
,所以它不是空的。 Rd文件實際上可以編譯成pdf格式,編號爲Rcmd rd2pdf
,其標題不爲空。
我是否錯過了這個錯誤非常基本的東西?我安裝了Rtools2.12。我甚至有包inline
和Rcpp
安裝和運行的例子很好。 爲了測試我的R環境設置,我下載了Rcpp源碼包並在Rcpp
上做了R cmd check
,它沒有問題。
Do R Core是否支持在cygwin下編譯?我認爲R for Windows需要mingw? – 2010-12-01 22:28:16
我不明白爲什麼有人把這個問題投下來-1。所以我把它重新回到0.這是一個有效的問題,包括示例代碼,細節等。 – Choens 2010-12-03 00:23:25