本文介绍了将rmarkdown编织为html时,选项卡未呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用rmarkdown和knitr创建html输出.突然之间,{.tabset}函数在编织时似乎已停止工作,并且文档呈现没有该选项的状态.

I've been using rmarkdown and knitr to create html output. Quite suddenly, the {.tabset} function seems to have stopped working when knitting, and documents render as they would without this option.

这是一个简单的示例,在我的系统上无法正常运行.

Here is a simple example that does not work as it should on my system.

---
title: "Plot Tabs"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

## Title {.tabset .tabset-fade .tabset-pills}

### tab 1

```{r}
plot(cars)
```

### tab 2

```{r}
plot(pressure)
```

我已经在另一个系统上对此进行了测试,并且工作正常.我还重新安装了R并更新了我的所有软件包以及RStudio.

I've tested this on another system, and it works fine. I've also reinstalled R and updated all my packages as well as RStudio.

有人知道任何类似的问题或任何可能导致该问题的东西吗?

Does anyone know of any similar issues, or anything that could be causing the problem?

推荐答案

这是一个已知的错误,并且已在 rmarkdown 的当前开发版本中已修复. strong>于2017年11月21日.请测试开发版本:

This is a known bug and has been fixed in the current development version of rmarkdown on Nov 21, 2017. Please test the development version:

devtools::install_github('rstudio/rmarkdown')

这篇关于将rmarkdown编织为html时,选项卡未呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 23:10