R flexdashboard删除标题栏 [英] R flexdashboard remove title bar
问题描述
我正在使用 rStudiodown
和 rStudio
中的 flexdashboard
包进行项目开发.一切都很好地融合在一起.但是我想删除您在此处图像顶部看到的蓝色标题栏.
I am working on a project using rMarkdown
and the flexdashboard
package from rStudio
. Everything is coming together nicely. But I would like to remove the blue title bar you see at the top of the image here.
我们将这个html页面放到一个窗口中,因此它成为第二个标题栏,看起来很糟糕. flexdashboard
中是否有一个功能可以删除整个设备?
We are dropping this html page into a window so it becomes a second title bar, which looks terrible. Is there a function in flexdashboard
to remove this entire apparatus?
这是YAML和您在照片中蓝色条下方看到的第一个块.任何建议将不胜感激.
Here is the YAML and the first chunk you see just below the blue bar in the photograph. Any suggestion would be greatly appreciated.
---
title: New Hampshire Statewide Age Adjusted Incedence Rates of Lyme
output:
flexdashboard::flex_dashboard:
orientation: rows
---
```{r setup, include=FALSE, message=FALSE, warning=FALSE, echo=TRUE}
```
Row
-----------------------------------------------------------------------
###
```{r, aarState, message=FALSE, warning=FALSE}
library(flexdashboard)
library(rbokeh)
#load state-wide age adjusted rates
aar<-read.csv("stateAAR.csv")
figure(title=" Age Adjusted Rates by Year",width= 1500, height =600) %>%
ly_segments(year, lci*100000, year, uci*100000, data=aar, color = "#b37700", width = 1) %>%
ly_points(year, adj.rate*100000, glyph = 21, size=6, data = aar, hover= "<strong>Rate per 100,000:</strong> @rateHundThou </br> <strong>Upper Confidence:</strong> @uciHT </br><strong> Lower Confidence:</strong> @lciHT " , color="#666622" )%>%
x_axis(label ='Year')%>%
y_axis(label ='Age Adjusted Rate')
```
Row
推荐答案
您可以直接将CSS样式直接添加到markdown文档中(不需要JQuery):
You can just add CSS styling directly to your markdown document (no JQuery required):
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
<style>
body {
padding-top:0px
}
.navbar{
visibility: hidden
}
</style>
```{r setup, include=FALSE}
library(flexdashboard)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r}
hist(iris$Sepal.Length)
```
Column {data-width=350}
-----------------------------------------------------------------------
### Chart B
```{r}
hist(iris$Sepal.Width)
```
### Chart C
```{r}
hist(iris$Petal.Length)
```
结果如下:
这篇关于R flexdashboard删除标题栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!