Here is a good overview of recommended ways:
http://r4ds.had.co.nz/r-markdown-formats.html#r-markdown-formats
I suggest using the package flexdashboard
(heading "Dashboards"). Interactivity can be provided by htmlwidgets
you can find an overview here:
http://www.htmlwidgets.org/
As an example, install:
install.packages('flexdashboards') # the dashboard
install.packages('plotly') # for interactive graphs
install.packages('DT') # for interactive tables
install.packages('tidyverse') # for data transformation etc
now create a dashboard as explained on
https://rmarkdown.rstudio.com/flexdashboard/
and fill it with your graph or tables. Here I use the starwars
dataset provided in the package dplyr
---
title: "Single Column (Fill)"
output:
flexdashboard::flex_dashboard:
vertical_layout: fill
---
### Chart 1
```{r}
library(tidyverse)
library(DT)
datatable(starwars %>% select(-films, -vehicles, -starships))
```
### Chart 2
```{r}
g <- starwars %>%
ggplot(aes(height, mass, color = gender)) +
geom_point() +
ggtitle("Mass vs. Height by gender")
library(plotly)
ggplotly(g)
```
output will be a html
(interactive) file with table and graph:
