Repository navigation
klct v0.2.1
Plot improvements
-
Significance brackets:
plot_groups()now uses
ggsignif::geom_signif()to draw proper comparison brackets between the
two treatment groups, replacing the previousgeom_text()approach that
placed asterisks above individual group bars. Brackets appear only in
facets with a significant result (P < 0.05). Pre-computed p-values
(Welch's t-test or Wilcoxon) are passed through, keeping the test logic
consistent withcompare_groups(). -
Data-driven y-axis limits: Removed
expand_limits(y = 0)from both
plot_groups()andplot_groups_2x2(). Axis limits are now determined
automatically by ggplot based on the data range, which substantially
improves readability for measures whose values are far from zero (e.g.,
Ct.vBMD~1074--1432,Ct.Ar/Tt.Ar~97--100%). -
Facet wrapping for many measures:
plot_groups()now caps facet
columns at 5 per row (viancol = min(n_measures, 5)) instead of forcing
all facets into a single row. This prevents facet labels from being clipped
when plotting the 9 default cortical measures. Trabecular plots (4 default
measures) are unaffected.
Interactive data tables
print_data(): New exported function that wrapsDT::datatable()to
display raw bone microCT data as interactive, sortable, searchable tables
in the Data tabs of the R Markdown templates. Each sex is displayed as a
separate table. Metadata columns (Animal ID,Site) are dropped and rows
are ordered by treatment/genotype group.
Template changes
- Version stamp: All four R Markdown templates now include a statement in
the Session Info section linking to the specific version of klct used to
generate the report, with links to the pkgdown site and the corresponding
GitHub release tag.
Dependencies
- Added
ggsignifto Imports (forgeom_signif()comparison brackets in
plot_groups()).