1

I'm trying to create a valuebox but my problem is that the subtitle text is too long.

Here is my code

```{r}
valueBox(12, 
         paste('Number of Cars',':','City','is Chicago'))
```

enter image description here

But my Goal would be something like this

enter image description here

I tried using "\n" but it didn't work.

camille
  • 16,432
  • 18
  • 38
  • 60
RL_Pug
  • 697
  • 7
  • 30

1 Answers1

2

I used paste0() instead, I was able to do this using HTML linebreak code <br>. I think it might depend if you are using flexdashboard, or shiny. But this should help hopefully.

---
title: "Old Faithful Eruptions"
output: flexdashboard::flex_dashboard
runtime: shiny
---

```{r}
flexdashboard::valueBox(42, paste0('Number of Cars',':','<br>','City ','is Chicago'))
```

enter image description here

Daniel_j_iii
  • 3,041
  • 2
  • 11
  • 27