RMarkdown html_output error

2019-06-25 13:58发布

I am trying to create a RMarkdown document with RStudio using shiny server. It works fine if the ouptut is pdf but if I want it as html I get this following error at the end of the process (in the RMarkdown console I can see it reached 100%).

Error: unrecognized fields specified in html_dependency: attachment

I have no idea why this error is happening. Can anyone help me with this?

Thank you

3条回答
时光不老,我们不散
2楼-- · 2019-06-25 14:42

Updating RStudio didn't work for me. What did work was updating all R packages (Tools > Check for Package Updates...).

查看更多
来,给爷笑一个
3楼-- · 2019-06-25 14:46

This is caused by a recent update of the relevant rmarkdown package or related ones.

Update RStudio to the latest version and then the error should disappear. It worked in my case.

查看更多
做自己的国王
4楼-- · 2019-06-25 14:53

I had a similar problem and found that it was caused by RStudio attempting to use Knitr to build a Shiny page. You can fix this by running using rmarkdown::run() instead of rmarkdown::render(). In some older versions of RStudio, the "Knit html" button runs this:

rmarkdown::render('filename.Rmd', 'html_document')

whereas, you can get the the results you want by running this command instead:

rmarkdown::run('filename.Rmd')

You could use this command or just update to the latest version of RStudio.

There is more info about authoring Shiny document here: http://rmarkdown.rstudio.com/authoring_shiny.html.

查看更多
登录 后发表回答