我最近将RStudio更新到了3.6.2,因为我有一个包或者其他东西,在我的3.5版本上不能工作。然而,我不知道我的问题是在我更新之前还是之后开始的。我从一个呈现rmarkdown的R脚本开始。一旦它开始渲染,它就会说:
> rmarkdown::render(input = "file.rmd", params=list(Start_Date = rpt .... [TRUNCATED]
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘knitr’Knitr没有显示更新,当我再次尝试安装它时,它会说:
> install.packages("knitr")
There is a binary version available but the source version is later:
binary source needs_compilation
knitr 1.27 1.28 FALSE
installing the source package ‘knitr’
trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.28.tar.gz'
Content type 'application/x-gzip' length 884866 bytes (864 KB)
downloaded 864 KB
'\\file\path_file\myname'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
'\\file\path_file\myname\R\R-3.6.2' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status
The downloaded source packages are in
‘K:\Users\AppData\Local\Temp\RtmpoJyMI4\downloaded_packages’我真的不知道为什么会这样。上周,我正在运行的这些文件运行得很好。如果我遗漏了更多信息,请告诉我。
发布于 2020-02-11 02:22:01
Windows :Windows二进制文件现在可以在CRAN上使用;install.packages("knitr")应该可以正常工作。
我不知道为什么最新的Windows二进制版本的knitr仍然不能在CRAN上使用,但你不必安装最新的版本。您可以在安装软件包之前设置options(install.packages.check.source = "no"),它将安装较旧的二进制版本。
或者再等几天,直到CRAN:https://cran.r-project.org/package=knitr上提供二进制版本。
https://stackoverflow.com/questions/60152750
复制相似问题