Download csv from table in flexdashboard

Hi there,

I am using flexdashboard in order to create some basic reporting.

After retrieving the data and some manipulation in dplyr, I use kable() in order to render a nice and clean table as follow:

I host the dashboard on shinyapps.

I would like to give the end user the possibility to download the table in a csv format.

I know it is possible to do it in shiny; is there any way to do this using flexdashboard?

With plain HTML output, you could try the xfun package:

```{r install}
# embed_file() requires a few more packages
xfun::pkg_load2(c('base64enc', 'htmltools', 'mime'))
```{r echo=FALSE}
# a single file

# multiple files
xfun::embed_files(c('source.Rmd', 'data.csv'))

# a directory
xfun::embed_dir('data/', text = 'Download full data')

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.