Reputation: 207
I am new to R markdown and tried to use it on my computer at work. However, I was not able to change the theme or add tabs. On my personal computer, however, everything works and I get pretty HTML documents.
I used the markdown document that opens every time you open a new document. I changed the html theme to lumen and included tabs:
## I want tabs {.tabset}
### Tab 1
```{r cars}
summary(cars)
```
### Tab 2
You can also embed plots, for example:
```{r pressure, echo=FALSE}
plot(pressure)
```
#{-}
Here I have some screenshots of the tab sections:
My laptop:
My computer at work:
my computer at work is not able to create the Tabs and is als not changing the font if I change the theme... If someone has suggestions on how to fix this, that would be great!
EDIT: Could it be an issue with the path? Since IT installs R for all computers the Pathvarible instead of "C:/Programms" is "\user01\User\username\Programms" I set the global PATH of R Studio to "C:/..." but if I knit the document in R Markdown, it still uses the weird path for the library path...
Upvotes: 4
Views: 528
Reputation: 1726
I wanted to just write a comment, but I don't have enough reputation for that. You can try to remove and re-install the yaml package and see if it helps.
But it would be good to get more information from you. Do you have an older version of R in your working computer? Apparently this was a known bug back in 2018. See Tabs not rendering when knitting rmarkdown to html. In this case the problem was solved by re-installing the yaml package and installing the dev version of Rmarkdown devtools::install_github('rstudio/rmarkdown')
.
Edit: Trying using package flexdashboard
---
title: "My tabs"
author:
output:
flexdashboard::flex_dashboard
---
## I want tabs {.tabset}
### Tab 1
```{r cars}
summary(cars)
```
### Tab 2
You can also embed plots, for example:
```{r pressure, echo=FALSE}
plot(pressure)
```
Good luck!
Upvotes: 3