Show code for missingness analysis
# Complex visualization code here...Exploratory data analysis (EDA) is the most critical stage for identifying data quality issues and refining hypotheses. While EDA can be “messy,” at emLab we treat it as a formal part of the research record. Using Quarto for EDA allows us to document not just what we found, but what we looked for and why certain paths were abandoned.
Use .qmd files as an interactive laboratory notebook. Unlike a final report, an EDA document should include:
EDA often requires long blocks of code to generate diagnostic plots. To keep the document readable while remaining transparent, use code-fold at the chunk level.
# Complex visualization code here...Static tables are often insufficient for exploring large datasets. We recommend using interactive widgets within your Quarto EDA documents (rendered to HTML) to allow for deeper inspection.
Use the DT package to create searchable, sortable tables. This is invaluable for spotting specific outliers or checking metadata.
library(DT)
mtcars |>
datatable(options = list(pageLength = 10, autoWidth = TRUE))skimrInstead of standard summary(), use skimr::skim() to get a high-level overview of distributions and missingness directly in your Quarto output.
mtcars |>
skimr::skim()For large projects, do not crowd a single file with all exploratory work. Instead: