knitr::opts_chunk$set(echo = FALSE)
r my_args$intro_text
^[r my_args$intro_note
]
k <- 1
r my_args$data_note
my_data %>% group_by(id, date) %>% mutate(obs = n()) %>% ungroup %>% group_by(id, date) %>% summarise_all( function(x) mean(x, na.rm = T)) %>% mutate_if(is.numeric, ~round(., 3)) %>% datatable(caption = paste('Data to date,', group, 'level'), rownames = TRUE, extensions = c('Buttons', 'Scroller', 'ColReorder', 'FixedColumns'), options = list(colreorder = TRUE, dom = 'Bfrtip', buttons = c('copy', 'csv', 'excel'), deferRender = TRUE, scrollY = 200, scroller = TRUE, scrollX = TRUE # fixedColumns = list(leftColumns = 1) ))
Technical: Summary measures on all data.
summary_table(my_data, my_vars)
Notes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.