New automatic route selection in agrobox(). The goal
is to place post-hoc letters through a viable and defensible statistical
route. For each cluster the function checks sufficient data,
Shapiro-Wilk (residual normality) and Fligner-Killeen (homogeneity of
variances), and then selects:
factor2 included in the model).Added non-parametric analysis:
agricolae::kruskal()
or Dunn post-hoc test, selected with the new argument
np_test = c("kruskal", "dunn").p.adj (default "bonferroni")
for p-value adjustment in Kruskal-Wallis and Dunn comparisons.Fallback chain: if the post-hoc test of the selected route cannot be computed, the next viable route is tried (A/B -> non-parametric, Friedman -> Kruskal-Wallis, Kruskal-Wallis <-> Dunn). Means without letters are shown only as a last resort, always with an explicit note.
Each agrobox() figure now includes a method note
(caption) describing the route used in each panel: why it was selected,
its advantages, limitations and scope. It can be removed with
+ ggplot2::labs(caption = NULL).
Route B now computes the Welch ANOVA p-value
(oneway.test()).
New columns in $stats: ruta,
metodo, p_ruta (p-value of the global test
used by the route) and nota.
Added agroppt() to export a ggplot figure to a
single editable PowerPoint slide (vector graphic), with custom width and
height.
bloque or
factor2 were supplied (letters disappeared). It now
compares treatments only and adds a note.agrobox() failed with could not find function
“%>%” when dplyr was not loaded.
%>% and .data are now imported.estructura = "row~" (documented) produced a parsing
error in facet_grid(); it is now completed internally as
"row ~ ."."_" (or non-ASCII characters in
non-UTF-8 sessions) sent means and letters to an extra NA
panel. Grouping columns are now recovered by joining on the cluster
instead of splitting its label.lim_sup / lim_inf removed
observations outside the range and altered the boxplots. Limits now use
coord_cartesian() (zoom only).factor2; it now uses partial eta squared (identical results
in one-way models).$tabla columns and $stats rows now follow
the facet order defined by grupo1_orden /
grupo2_orden.NA in
$tabla when treatments are nested within groups.\makecell headers in $tabla no
longer split labels that contain "_".orden_factor, grupo1_orden or
grupo2_orden.ANOVA row of $tabla shows significance
stars only for route A; other routes show "-".agrobox() wrapped in
\donttest{} to keep example run time within CRAN
limits.var.equal no longer changes the results: the route is
selected automatically. The argument is kept for backward compatibility
and a message is shown when it is supplied.factor2.officer and rvg to Suggests (only
required by agroppt()).orden_factorgrupo1_ordengrupo2_ordennitrogeno_liberacion: nitrogen release dynamics from
fertilizers.pimiento_hibridacion: hybrid seed production dynamics
in pepper.agrobox():
$data: summarized dataset used in the analysis (means,
sd, n).$stats: ANOVA diagnostics per cluster (p-values, CV,
Power).Faceting now correctly respects factor level order defined by:
grupo1_ordengrupo2_ordenThis resolves previous inconsistencies with facet_grid()
ordering.
Improved handling of factor levels across all internal steps:
Cluster construction is now more robust:
interaction() when both grouping variables are
present.Enhanced statistical robustness:
Improved compatibility with ggplot2 faceting behavior by enforcing factor levels prior to plotting.
aplicar_orden_labels():
geom_text():
magick, kableExtra, and
tinytex from Imports to Suggests.agrosintesis(), a high-level wrapper to automate
multi-variable ANOVA summaries using agrobox() as the core
engine.
Variedad ~ Localidad).estructura = NULL, the analysis is performed
globally (no clustering).agroexcel() to export agrobox and agrosintesis
results to Excel (.xlsx) files.
agrotabla() to export result tables as
high-resolution PNG images.
library() calls inside functions.\dontrun{}.