首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Knitr未加载/未找到?

Knitr未加载/未找到?
EN

Stack Overflow用户
提问于 2020-02-10 22:44:24
回答 1查看 520关注 0票数 1

我最近将RStudio更新到了3.6.2,因为我有一个包或者其他东西,在我的3.5版本上不能工作。然而,我不知道我的问题是在我更新之前还是之后开始的。我从一个呈现rmarkdown的R脚本开始。一旦它开始渲染,它就会说:

代码语言:javascript
复制
> 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没有显示更新,当我再次尝试安装它时,它会说:

代码语言:javascript
复制
> 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’

我真的不知道为什么会这样。上周,我正在运行的这些文件运行得很好。如果我遗漏了更多信息,请告诉我。

EN

回答 1

Stack Overflow用户

发布于 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上提供二进制版本。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60152750

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档