代码之家  ›  专栏  ›  技术社区  ›  Scott Grammilo

如何修复在r中编织时出现的“调用:库执行暂停”错误?

  •  0
  • Scott Grammilo  · 技术社区  · 8 年前

    我只是试图将默认的Rmarkdonw代码(关于mtcars)编织成HTML(甚至PDF),但它不起作用。以下是Rmarkdown控制台中的完整错误消息:

    Error in !character.only : invalid argument type
    Calls: library
    Execution halted
    

    以下是knit中的默认代码:

    ---
    title: "Untitled"
    author: "Piyush Verma"
    date: "December 19, 2017"
    output: html_document
    ---
    
    ```{r setup, include=FALSE}
    knitr::opts_chunk$set(echo = TRUE)
    ```
    
    ## R Markdown
    
    This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
    
    When you click the **Knit** button a document will be generated that includes both contents as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
    
    ```{r cars}
    summary(cars)
    ```
    
    ## Including Plots
    
    You can also embed plots, for example:
    
    ```{r pressure, echo=FALSE}
    plot(pressure)
    ```
    
    Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
    

    我也尝试过做以下事情,但都没有成功:

    1. Tools --&燃气轮机; Global options --&燃气轮机; Sweave --&燃气轮机; Weave RNW files using ...从…起 sweave knitr
    2. 在运行knit选项之前,重新安装rmarkdown和knitr并连接库

    非常感谢您的建议。这是关于提交约翰·霍普金实用机器学习课程的最终项目集。

    1 回复  |  直到 8 年前
        1
  •  -1
  •   Scott Grammilo    8 年前

    大家好,所有想帮忙的人。

    我通过重新安装R和RStudio解决了这个问题。 在重新安装并运行默认的Rmarkdown代码后,RStudio想再次安装Rmarkdown包,最终它成功了。

    非常感谢。