我正在尝试使用“ ggbiplot”软件包来计算PCA。但是,当我尝试安装软件包时,出现错误:
install.packages("devtools")
Installing package into ‘C:/Users/dlenz/OneDrive/Dokumente/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependency ‘digest’
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/digest_0.6.23.zip'
Content type 'application/zip' length 249129 bytes (243 KB)
downloaded 243 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/devtools_2.2.1.zip'
Content type 'application/zip' length 342747 bytes (334 KB)
downloaded 334 KB
package ‘digest’ successfully unpacked and MD5 sums checked
Error in install.packages : ERROR: failed to lock directory ‘C:\Users\dlenz\OneDrive\Dokumente\R\win-library\3.6’ for modifying
Try removing ‘C:\Users\dlenz\OneDrive\Dokumente\R\win-library\3.6/00LOCK’
> remotes::install_github("vqv/ggbiplot")
Downloading GitHub repo vqv/ggbiplot@master
These packages have more recent versions available.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: ggplot2 (3.2.0 -> 3.2.1) [CRAN]
5: scales (1.0.0 -> 1.1.0) [CRAN]
6: rlang (0.4.1 -> 0.4.2) [CRAN]
7: Rcpp (1.0.1 -> 1.0.3) [CRAN]
8: R6 (2.4.0 -> 2.4.1) [CRAN]
9: backports (1.1.4 -> 1.1.5) [CRAN]
Enter one or more numbers, or an empty line to skip updates:
Installing 2 packages: digest, farver
Installing packages into ‘C:/Users/dlenz/OneDrive/Dokumente/R/win-library/3.6’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
digest 0.6.22 0.6.23 TRUE
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/farver_2.0.1.zip'
Content type 'application/zip' length 1899623 bytes (1.8 MB)
downloaded 1.8 MB
package ‘farver’ successfully unpacked and MD5 sums checked
Error: Failed to install 'ggbiplot' from GitHub:
ERROR: failed to lock directory ‘C:\Users\dlenz\OneDrive\Dokumente\R\win-library\3.6’ for modifying
Try removing ‘C:\Users\dlenz\OneDrive\Dokumente\R\win-library\3.6/00LOCK’
如果我尝试None
进行更新,则会得到以下输出:
> remotes::install_github("vqv/ggbiplot")
Downloading GitHub repo vqv/ggbiplot@master
These packages have more recent versions available.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: ggplot2 (3.2.0 -> 3.2.1) [CRAN]
5: scales (1.0.0 -> 1.1.0) [CRAN]
6: rlang (0.4.1 -> 0.4.2) [CRAN]
7: Rcpp (1.0.1 -> 1.0.3) [CRAN]
8: R6 (2.4.0 -> 2.4.1) [CRAN]
9: backports (1.1.4 -> 1.1.5) [CRAN]
Enter one or more numbers, or an empty line to skip updates:
3
Installing 2 packages: digest, farver
Installing packages into ‘C:/Users/dlenz/OneDrive/Dokumente/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/digest_0.6.23.zip'
Content type 'application/zip' length 249129 bytes (243 KB)
downloaded 243 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/farver_2.0.1.zip'
Content type 'application/zip' length 1899623 bytes (1.8 MB)
downloaded 1.8 MB
package ‘digest’ successfully unpacked and MD5 sums checked
Error: Failed to install 'ggbiplot' from GitHub:
ERROR: failed to lock directory ‘C:\Users\dlenz\OneDrive\Dokumente\R\win-library\3.6’ for modifying
Try removing ‘C:\Users\dlenz\OneDrive\Dokumente\R\win-library\3.6/00LOCK’
我也安装了Rtools,但没有任何改变。有谁知道如何解决这个问题?
非常感谢