在flexdashboard中,如何获取valueBox的标题和标题?

时间:2019-12-03 19:19:12

标签: r r-markdown flexdashboard

我想使用flexdashboard显示地图,然后显示两行值框,每行两框。我希望每个框都有一个标题和标题,但我一辈子都找不到解决方法。下面的例子

 ---
title: "example"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    vertical_layout: fill
---

```{r setup, include=FALSE}
library(flexdashboard)

value_one <- mtcars$mpg[[1]]

value_two <- mtcars$mpg[[2]]

```



Row
-----------------------------------------------------------------------
### Chart One Title 
```{r}

valueBox(value_one,
         caption="this is my caption")
```


### Chart Two Title

```{r}


valueBox(value_two,
         caption="this is another caption")
```

当我这样做时,我得到 enter image description here

0 个答案:

没有答案