- Add reactable-demo post exercising the full statdown/depkit htmlwidget pipeline (two reactable tables with filtering) - Replace renv::restore() with renv::load() using explicit project root in Makefile and watch-rmd.sh — renv could not find the lockfile when cd'd into post subdirectories Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
44 lines
877 B
Plaintext
44 lines
877 B
Plaintext
---
|
|
title: "Interactive Table Demo"
|
|
date: "2025-03-17"
|
|
slug: "reactable-demo"
|
|
draft: true
|
|
---
|
|
|
|
This post demonstrates an interactive table rendered through the
|
|
statdown/depkit pipeline. The `reactable` package creates an htmlwidget,
|
|
which statdown hands off to depkit for CSS/JS asset management.
|
|
|
|
```{r setup, include=FALSE}
|
|
knitr::opts_chunk$set(
|
|
echo = FALSE,
|
|
warning = FALSE,
|
|
message = FALSE
|
|
)
|
|
```
|
|
|
|
## Basic Table
|
|
|
|
```{r basic-table}
|
|
library(reactable)
|
|
|
|
reactable(mtcars[1:10, ], filterable = TRUE, searchable = TRUE)
|
|
```
|
|
|
|
## Styled Table
|
|
|
|
```{r styled-table}
|
|
reactable(
|
|
iris[1:15, ],
|
|
columns = list(
|
|
Sepal.Length = colDef(name = "Sepal Length"),
|
|
Sepal.Width = colDef(name = "Sepal Width"),
|
|
Petal.Length = colDef(name = "Petal Length"),
|
|
Petal.Width = colDef(name = "Petal Width")
|
|
),
|
|
striped = TRUE,
|
|
highlight = TRUE,
|
|
bordered = TRUE
|
|
)
|
|
```
|