2013-02-07 6 views
3

시뮬레이션 프로젝트를 위해 R 패키지에서 작업하고 있습니다. 집에서 컴퓨터로 RStudio를 사용하여 성공적으로 빌드하고 설치했습니다. 그러나 대학의 다른 컴퓨터에서 나는 문제가 있습니다 ... RStudio에서 바이너리를 빌드하고 설치하는 경우에도 설치가됩니다. 오류가 발생합니다. 소스를 컴파일하여 .tar.gz가 작동하면 오류가 발생합니다. , 그런 다음 설치하려고 할 때 오류가 다시 나타납니다. 오류가 두 번 발생하는 판독 값은 다음과 같습니다. 도서관과 관련이 있다고 생각합니다. 그러나 이것이 내 가정용 컴퓨터와 다른 이유는 무엇인지 모르겠습니다. 저는 프로그래머가 아니며 R 및 RTools와 RStudio를이 컴퓨터에서와 똑같은 방법으로 개인용 컴퓨터에 설치했습니다. 기계. - 며칠 동안 관리자 액세스 권한이 있습니다.R 사용자 정의 패키지 파일 설치 오류

install.packages("speEaR_1.0.tar.gz", repos=NULL, type="source") 
Installing package(s) into ‘\\ueahome5/ressci17/yrq12edu/data/Documents/R/win-library/2.15’ 
(as ‘lib’ is unspecified) 
* installing *source* package 'speEaR' ... 
** R 
** preparing package for lazy loading 
** help 
Warning: C:/Users/yrq12edu/AppData/Local/Temp/Rtmp84HJPx/R.INSTALL7e81a241d97/speEaR/man/makeSetMatrix.Rd:25: unknown macro '\begin' 
Warning: C:/Users/yrq12edu/AppData/Local/Temp/Rtmp84HJPx/R.INSTALL7e81a241d97/speEaR/man/makeSetMatrix.Rd:26: unknown macro '\item' 
Warning: C:/Users/yrq12edu/AppData/Local/Temp/Rtmp84HJPx/R.INSTALL7e81a241d97/speEaR/man/makeSetMatrix.Rd:30: unknown macro '\end' 
*** 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 '\\ueahome5/ressci17/yrq12edu/data/Documents/R/win-library/2.15/speEaR' 
Warning messages: 
1: running command 'C:/PROGRA~1/R/R-215~1.2/bin/i386/R CMD INSTALL -l "\\ueahome5/ressci17/yrq12edu/data/Documents/R/win-library/2.15" "speEaR_1.0.tar.gz"' had status 1 
2: In install.packages("speEaR_1.0.tar.gz", repos = NULL, type = "source") : 
    installation of package ‘speEaR_1.0.tar.gz’ had non-zero exit status 

답변

2

며칠 전에 비슷한 오류가 발생했습니다. 이 디렉토리에 설치 중이기 때문입니다.

'\\ueahome5/ressci17/yrq12edu/data/Documents/R/win-library/2.15/speEaR' 

네트워크 드라이브에 연결되어있는 것 같습니다. 당신이해야 할 것은 당신이 설치할 때 라이브러리의 위치를 ​​지정하는 데 사용할 해당 네트워크 드라이브로 이동

'M:/ressci17/yrq12edu/data/Documents/R/win-library/2.15/' 

처럼 명시 적으로 주소를 복사합니다. 예를 들어 :

library(devtools) 
has_devel() ## check if your Rtools are properly installed 
check('speEaR') 
##build('speEaR') 
install("speEaR",args='-l "U:/ressci17/yrq12edu/data/Documents/R/win-library/2.15/"') 

이 내 문제를 해결하는 방법입니다

install.packages("speEaR_1.0.tar.gz", repos=NULL, type="source",lib='U:/ressci17/yrq12edu/data/Documents/R/win-library/2.15/') 

또는, DevTools로을 시도하여 타르 공을 풀고 그런 짓을.

+0

는 그것은 네트워크 드라이브에 접속된다. 감사! 나는 아침에 해결책을 먼저 시도 할 것이다! – Ward9250

+0

R CMD BUILD INSTALL의 -l 옵션에'\\ ueahome5/ressci17/yrq12edu/data/Documents/R/win-library/2.15 /'를 넣고'U :/ressci17/yrq12edu/data/Documents/R/win-library/2.15 /'를 실행하십시오. 슬프게도 그것은 존재하지 않기 때문에 두 번째 것에 cd 할 수 없다고 말합니다. 첫 번째 것은 lib.loc에 대한 것과 이전과 같은 문제를 제공하지만'\\ ueahome5/ressci17/yrq12edu/data/Documents/R/win-library/2.15/00LOCK-speEaR/speEa' – Ward9250

+0

@ Axolotl9250, 먼저 윈도우 탐색기에'U :/ressci17/yrq12edu/data/Documents/R/win-library/2.15 /'를 복사해야한다고 생각합니다. 해당 디렉토리에 액세스 할 수 있는지 확인하십시오. 작동한다면, 아마도'devtools' 패키지를 사용해보십시오. 예를 들어 대답을 편집했습니다. – Zhenglei

0

R 스크립트의 roxygen 주석에 Windows 경로 백 슬래시와 관련된 문제가 있음을 발견했습니다. 해결 방법은 백 슬래시를 단일 슬래시로 변경하는 것입니다. 예 : 원래 내 roxygen 정보는 다음과 같이이었다 :

이 경고 메시지가 발생
#' Performs a search in MS Windows file system for all files in the 
#' `C:\USERS\MYNAME` directory, and all directories below that 

:

* installing to library 'C:/Users/MYNAME/Documents/R/win-library/3.2' 
* installing *source* package 'whatever' ... 
** R 
** preparing package for lazy loading 
** help 
Warning: C:/Users/MYNAME/Documents/R/CODE/whatever/man/func.Rd:11: unknown macro '\USERS' 
Warning: C:/Users/MYNAME/Documents/R/CODE/whatever/man/func.Rd:11: unknown macro '\MYNAME' 
*** installing help indices 
** building package indices 
** testing if installed package can be loaded 
* DONE (whatever) 

단서가 텍스트 대신 RStudio에서 일반적인 블루 오렌지는 것입니다. enter image description here

백 슬래시를 슬래시로 변경하면 경고 메시지가 표시되지 않고 모든 roxygen 설명이 파란색으로 변경됩니다.

#' Performs a search in MS Windows file system for all files in the 
#' `C:/USERS/MYNAME` directory, and all directories below 

enter image description here