Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
773 views
in Technique[技术] by (71.8m points)

rstudio - Tabs not rendering when knitting rmarkdown to html

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)
```

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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')

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...