CRAN preparation.
Delta ~ "= +4.2%") and an
ASCII minus sign, so it renders on every graphics device including the pdf()
device used by R CMD check. Previously the literal U+0394 and U+2212 glyphs
failed with "conversion failure ... mbcsToSbcs" on devices with single-byte
encodings.@importFrom tags joined; NAMESPACE is now generated by roxygen2.dplyr, grid and magrittr removed from Imports (never used)..Rbuildignore added; developer notes no longer ship in the tarball.Publication-quality rendering refinements.
mirror_slope_plot() gains y_percent (default TRUE) to format y-axis
ticks and header statistics with a percent sign; set FALSE for
absolute-scale outcomes.mirror_slope_plot() gains jitter_points (default FALSE) to spread
overlapping individual endpoints horizontally for readability, reproducible
via seed.y_percent = TRUE.Individual trajectory lines are now drawn from each subject's baseline to the central endpoint only, grouped by arm and subject, so no line crosses the centre or connects across arms. This removes the main source of visual clutter.
Mean-endpoint diamonds now sit on a small white halo so they read cleanly where the converging lines crowd the central knot.
Directional arrows are lighter and smaller, receding as chart furniture.
The difference bracket is now a thin hairline matching the axis weight, with short inward serifs and more space before the annotation text, for a cleaner measurement mark.
Chart furniture (axis lines, ticks, gridlines, reference lines, arrows) now uses a single coherent light hairline family so nothing competes with the data.
Slope echoes are shorter and more muted, reading as a subtle continuation hint rather than data.
theme_mirror() now sets a clean sans typeface, a clear title/subtitle/caption
hierarchy, and refined spacing; base_family defaults to a Helvetica/Arial/sans
stack and can be overridden.
Default mean-line width and marker size were reduced slightly for print.
save_path documents vector output (.pdf/.svg) for journal submission.
Initial release.
prep_mirror_data() prepares a long analysis dataset into a mirror_data
object: validates structure, applies population flags with AND logic, retains
baseline and endpoint visits, assigns role columns, counts analysed N per arm,
and records provenance metadata (schema version, filters, timestamp, call).add_summary() attaches group-level estimates and the baseline each mean line
is drawn from, supporting both change-from-baseline (baseline 0) and
absolute-scale outcomes.add_precision() attaches per-arm standard errors or confidence intervals.add_difference() attaches the between-arm difference with optional standard
error, confidence interval, and p-value; warns on sign inconsistency.mirror_slope_plot() renders the figure as a standard ggplot object.
Optional elements (individual trajectories, difference band, relative-benefit
annotation, per-arm precision, N in the strip header) are off by default and
shown only on request. The annotation zone auto-expands the x-axis without
altering the data panel.mirror_palette() provides "default", "colorblind" (Okabe-Ito), and
"capricor" palettes.theme_mirror() supplies a publication theme with proportional text scaling.print(), summary(), and as.data.frame() for mirror_data.mirror_data structure conforms to a versioned specification (schema 1.0)
shared with a companion SAS macro, so both tools produce equivalent figures
from equivalent inputs.direction describes the direction of numeric movement (endpoint versus
baseline). For outcomes where the favourable direction is unusual, supply
outcome_label and benefit_label explicitly.mirrorslope.