2012-02-06 6 views
4

Windows에서 아카이브에있는 패키지를 어떻게 설치할 수 있습니까?아카이브에 R 패키지를 설치하십시오.

http://cran.r-project.org/src/contrib/Archive/

나는 다음과 같은 오류 얻을 아카이브에서 다운로드 한 tar.gz의 설치하려고 할 때 :

Error in gzfile(file, "r") : cannot open the connection 
In addition: Warning messages: 
1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file 
2: In gzfile(file, "r") : 
    cannot open compressed file 'grasp_2.5-7.tar.gz/DESCRIPTION', probable reason 'No such file or directory' 
+2

Windows 소스 설치에는 Rtools가 필요할 수 있습니다. –

답변

5

당신은 devtools의 기능 install_version을 시도 할 수 있습니다. ggplot2의 버전 0.8을 설치하려는 경우이를 install_version('ggplot2', '0.8')이라고 부를 수 있습니다. Windows 사용자 인 경우 here 지침에 따라 소스에서 패키지를 빌드 할 수 있습니다.

5

당신은 소스 (tar.gz의 파일)을 다운로드 할 수 있습니다 및 사용하여 설치 :

R CMD INSTALL packagename.tar.gz 
+0

로컬 zip에서 설치를 시도했는데 오류가 발생했습니다 (질문 참조) –

+0

동일한 오류 일 경우 그렇게 말합니다. 현재 우리는 gzipped 파일의 로컬 복사본이 있더라도보고있는 내용을 알지 못하고 여러 가지 가능한 오류가 있습니다. –

+0

예, 동일한 오류, 의견 및 질문 편집이 동시에 이루어졌습니다. szipped 파일은 http://cran.r-project.org/src/contrib/Archive/에서 다운로드되었습니다. 이미 3 가지 버전을 사용할 수 있었고 동일한 오류가 발생했습니다. 나는 Rtools로 시도 할 것이다. –

0

아카이브에서 그래프 패키지를 설치하는 데 동일한 문제가있었습니다. 이 패키지는 다른 패키지 (bnclasify)에 필요합니다.

chooseBioCmirror() #select a different mirror than CRAN. This mirror may be #because is the one that has bnclasify in it (check this statement) 

setRepositories() #In here you can select as many as you want to search for the  #package you need 

ap <- available.packages() #list of all available packages 

"graph" %in% rownames(ap) #search the package you need by name (return TRUE or #FALSE). 

install.packages("graph", dependencies=TRUE) #if the last statement TRUE then #install the package like normally 
관련 문제