我只是想将默认的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.
我也试过做以下事情,但没有任何效果:
Tools
- &gt; Global options
- &gt; Sweave
- &gt; Weave RNW files using
...从sweave
到knitr
任何建议都非常感谢。这是关于提交约翰霍普金的实用机器学习课程的最终项目。
答案 0 :(得分:0)
大家好,他们都试图提供帮助。
我能够通过重新安装R和RStudio来解决问题。 重新安装并运行默认的Rmarkdown代码后,RStudio再次安装Rmarkdown软件包并在最后工作。
谢谢。