[英]Install R packages in archive
如何在Windows中安裝存檔中的軟件包?
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'
您可以下載源(tar.gz文件)並使用以下命令安裝它們:
R CMD INSTALL packagename.tar.gz
您可以在devtools
嘗試install_version
函數。 我們假設您要安裝ggplot2
0.8版本,可以將其稱為install_version('ggplot2', '0.8')
。 如果您使用的是Windows,則可以按照此處的說明從源代碼構建軟件包。
從存檔安裝圖形包時遇到同樣的問題。 另一個包(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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.