```{=html}
.main-container { max-width: 1200px; margin-left: auto; margin-right: auto;}
.rt-search{ align-self: baseline; width: 400px; margin-bottom: 0px; }
svg.main-svg{ overflow:visible !important; }
```r knitr::opts_chunk$set(warning = FALSE, message = FALSE, comment = NA) knitr::opts_chunk$set(cache = FALSE) options(width=170)
library(dataxray) library(tidyverse) library(haven) library(crosstalk)
data <- params$data dim <- dim(data) data_xray <- make_xray(data, by = params$by)
d_reactable <- data_xray d_reactable_shared <- SharedData$new(d_reactable) filter_select('type', 'variable TYPE', d_reactable_shared, ~ TYPE) filter_select('var', 'variable NAME', d_reactable_shared, ~ VAR) filter_select('lab', 'variable LABEL', d_reactable_shared, ~ LABEL) filter_select('n', 'variable COMPLETE',d_reactable_shared, ~ ifelse(n == dim[1], 'YES', 'NO')) filter_slider('missing', 'variable % MISSING', d_reactable_shared, ~ 100*(missing/dim[1]), width = 250, post = '%', min = 0, max = 100, dragRange = FALSE, step = 5, round = TRUE, sep = '', ticks = TRUE) filter_slider('distinct', 'variable # DISTINCT', d_reactable_shared, ~ distinct, width = 250, min = 1, dragRange = FALSE, step = 5, ticks = FALSE)
r toupper(params$data_name)
DATA with r dim[1]
OBSERVATIONS and r dim[2]
VARIABLESview_xray(data_xray = d_reactable, data_xray_shared = d_reactable_shared, by = params$by)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.