Chisle
The coding-agent plugin that bills 52% of a bare model across 20 live tasks. Terse persona + tool-output compressor + context diet.
翻訳待ち
SafePivot provides a drag-and-drop pivot table htmlwidget for R and Shiny with robust aggregators, missing-value summaries, zero-value summaries, heatmaps, lightweight Plotly charts, Shiny config capt
翻訳待ち
開発ツールR · JavaScriptGitHub @dongwenluoオンライン所有者未確認
Have you tried it? One tap is enough. No sign-in needed.
What the Package Does (One Line, Title Case)
翻訳待ち
Loading the full README.
Read the full README ↗safePivot is an R htmlwidget for safer interactive drag-and-drop pivot
tables. It wraps PivotTable.js and adds R-focused safeguards for
exploratory data analysis, Shiny export, and reproducible reporting
workflows.
The main idea is simple:
safePivot is especially useful when empty cells, observed missing
values, and observed zero values must stay clearly separated.
Install the development version from GitHub:
# install.packages("remotes")
remotes::install_github("dongwenluo/safePivot")
Load the package:
library(safePivot)
safe_pivot_compute().input$<outputId>_config.safe_pivot_compute_from_config().inclusions / exclusions) that are also applied
on export.unused_layout).safePivot(
iris,
rows = "Species",
vals = "Sepal.Length",
aggregator = "Median",
renderer = "Table"
)
Drag variables between the unused list, the rows area (left) and the columns area (top); pick the aggregator and value variable at top left.
safePivot(
mtcars,
rows = "cyl",
cols = "gear",
vals = "mpg",
aggregator = "Mean",
renderer = "Heatmap",
heatmap_palette = "green"
)
Available heatmap palettes are:
"blue"
"yellow_orange"
"green"
"blue_white_red"
"green_red"
Available heatmap renderers are:
"Heatmap"
"Row Heatmap"
"Col Heatmap"
Browser-side conditional formatting is intentionally disabled for heatmap renderers so that heatmap palettes are not overwritten by SafePivot table-cell formatting classes.
safePivot includes lightweight Plotly renderers for quick visual
summaries:
safePivot(
mtcars,
rows = "cyl",
cols = "gear",
vals = "mpg",
aggregator = "Mean",
renderer = "Bar Chart",
plot_default_height = 520
)
Supported chart renderers include:
"Horizontal Bar Chart"
"Horizontal Stacked Bar Chart"
"Bar Chart"
"Stacked Bar Chart"
"Line Chart"
"Area Chart"
"Scatter Chart"
"Multiple Pie Chart"
Treemap is intentionally not included in the core package because it requires a larger Plotly bundle and extra hierarchy-specific renderer logic.
safePivot can show compact badges beside draggable variables. These
badges help users decide which variables are suitable for rows, columns,
or values before they start dragging.
| Badge | Meaning |
|---|---|
num | numeric / double |
int | integer |
chr | character |
fct | factor |
ord | ordered factor |
date | Date |
time | POSIX date-time |
lgl | logical |
list | list column |
obj | other object type |
badge_dat <- data.frame(
id = 1:3,
score = c(1.2, 3.4, 5.6),
group = factor(c("A", "B", "A")),
ordered_group = factor(
c("low", "medium", "high"),
levels = c("low", "medium", "high"),
ordered = TRUE
),
name = c("x", "y", "z"),
flag = c(TRUE, FALSE, TRUE),
harvest_date = as.Date(c("2026-01-01", "2026-01-02", "2026-01-03")),
timestamp = as.POSIXct(c(
"2026-01-01 08:00:00",
"2026-01-02 08:00:00",
"2026-01-03 08:00:00"
))
)
safePivot(
badge_dat,
vals = "score",
aggregator = "Mean",
show_type_badges = TRUE,
unused_layout = "top"
)
If a variable is an R factor, safePivot can respect its factor-level
order.
iris2 <- iris
iris2$Species <- factor(
iris2$Species,
levels = c("virginica", "versicolor", "setosa")
)
safePivot(
iris2,
rows = "Species",
vals = "Sepal.Length",
aggregator = "Median",
renderer = "Table",
respect_factor_order = TRUE
)
For ordered factors, define levels explicitly instead of relying on alphabetical order:
ordered_dat <- data.frame(
stage = factor(
c("low", "medium", "high"),
levels = c("low", "medium", "high"),
ordered = TRUE
),
value = c(1, 2, 3)
)
safePivot uses explicit aggregation rules so that empty pivot cells,
observed missing values, and observed zero values are not confused.
This is the beginning of the README. Read the rest at the original. Read the full README ↗