Como replicar o Knit HTML em uma linha de comando?
Eu sei que esta pergunta é semelhante aesta 1. Como não consegui encontrar uma solução lá, publique-a aqui novamente.
Eu quero obter exatamente a mesma saída que recebo clicando em "Knit HTML", mas através de um comando. Tentei usar knit2html, mas ele mexe com a formatação e não inclui o título, o kable não funciona etc.
Exemplo:
Este é o meu arquivo test.Rmd,
---
title: "test"
output: html_document
---
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 content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r}
library(knitr,quietly=T)
kable(summary(cars))
```
You can also embed plots, for example:
```{r, echo=FALSE}
plot(cars)
```
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
Resultado:
Malha HTML
knit2html