Skip to content

agrobox

0.4.0Package record

Data Visualization and Statistical Tools for Agroindustrial Experiments

0packages depend
5.8Kdownloads / year
–test coverage
13/13flavors OK

Overview

About

Set of tools for statistical analysis, visualization, and reporting of agroindustrial and agricultural experiments. The package provides functions to perform one-way and two-way ANOVA with post-hoc tests (Tukey HSD and Duncan MRT), Welch ANOVA for heteroscedastic data, and the Games-Howell post-hoc test as a robust alternative when variance homogeneity fails. When residual normality fails, the Kruskal-Wallis test (with 'agricolae' or Dunn post-hoc letters) or, for blocked designs, the Friedman test is used, so that letters are always obtained through a defensible route. Normality of residuals is assessed with the Shapiro-Wilk test and homoscedasticity with the Fligner-Killeen test; the appropriate statistical path is selected automatically based on these diagnostics. Coefficients of variation and statistical power (via one-way ANOVA power analysis) are reported alongside the post-hoc letter display, and each figure includes a note describing the statistical route used, its rationale, advantages, limitations and scope. High-level wrappers allow automated multi-variable analysis with optional clustering by one or two experimental factors, with support for custom level ordering and relabeling. Results are returned as 'ggplot2' boxplots with mean and letter annotations, wide-format summary tables ready for publication or LaTeX rendering, and structured decision summaries for rapid agronomic interpretation. Direct export to Excel spreadsheets and high-resolution image tables is also supported. Functions follow methods widely used in agronomy, field trials, and plant breeding. Key references: Tukey (1949) doi:10.2307/3001913; Duncan (1955) doi:10.2307/3001478; Welch (1951) doi:10.2307/2332579; Games and Howell (1976) doi:10.2307/2529858; Shapiro and Wilk (1965) doi:10.2307/2333709; Fligner and Killeen (1976) doi:10.2307/2529096; Kruskal and Wallis (1952) doi:10.1080/01621459.1952.10483441; Dunn (1964) doi:10.1080/00401706.1964.10490181; Friedman (1937) doi:10.1080/01621459.1937.10503522; Cohen (1988, ISBN:9781138892899); Wickham (2016, ISBN:9783319242750) for 'ggplot2'; see also 'agricolae' https://CRAN.R-project.org/package=agricolae and 'rstatix' https://CRAN.R-project.org/package=rstatix. Version en espanol: Conjunto de herramientas para el analisis estadistico, visualizacion y generacion de reportes en ensayos agroindustriales y agricolas. Incluye ANOVA univariado y bifactorial con pruebas post-hoc (Tukey HSD y Duncan MRT), ANOVA de Welch para datos heterocedasticos y la prueba post-hoc de Games-Howell como alternativa robusta cuando falla la homogeneidad de varianzas. Cuando falla la normalidad de residuos se usa la prueba de Kruskal-Wallis (con letras de 'agricolae' o de Dunn) o, en disenos en bloques, la prueba de Friedman, de modo que las letras se obtienen siempre por una ruta defendible. La normalidad de residuos se evalua con la prueba de Shapiro-Wilk y la homogeneidad de varianzas con la prueba de Fligner-Killeen; la ruta estadistica apropiada se selecciona automaticamente segun estos diagnosticos. Se reportan coeficientes de variacion y potencia estadistica junto con las letras de separacion de medias, y cada grafico incluye una nota que describe la ruta estadistica usada, por que, sus ventajas, desventajas y alcance. Los envoltorios de alto nivel permiten analisis multivariable automatizado con agrupamiento opcional por uno o dos factores experimentales, con soporte para orden y etiquetado personalizado de niveles. Los resultados se devuelven como boxplots con anotaciones de medias y letras, tablas resumen en formato ancho listas para publicacion o renderizado en LaTeX, y resumenes de decision para interpretacion agronomica rapida. Tambien se soporta exportacion directa a Excel e imagenes de alta resolucion para informes tecnicos.

Changes in 0.4.0

New features

  • 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:
  • **Route A** (normal + homogeneous): ANOVA + Duncan / Tukey (block and factor2 included in the model).
  • **Route B** (normal + heteroscedastic): Welch ANOVA + Games-Howell.
  • **Route C** (not normal + homogeneous): Kruskal-Wallis, or Friedman when a block is present.
  • **Route D** (not normal + heteroscedastic): same tests as route C, flagged with a note on heterogeneous variances.
Show all changes in 0.4.0Hide the rest of the changes in 0.4.0
  • Added non-parametric analysis:
  • Kruskal-Wallis with letters from agricolae::kruskal() or Dunn post-hoc test, selected with the new argument np_test = c("kruskal", "dunn").
  • Friedman test for blocked designs (RCBD). Replicates per treatment x block are averaged and incomplete blocks are excluded. Letters are protected by the global Friedman test (all treatments share "a" when it is not significant).
  • New argument 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.

Bug fixes

  • Games-Howell letters were relabeled as whole strings, so a group such as "ab" became a new letter and produced wrong groupings. Letters are now relabeled letter by letter.
  • Games-Howell failed silently when 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 ~ .".
  • Group labels containing "_" (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.
  • Negative responses: the automatic upper y-axis limit fell below the maximum and removed observations; the CV was reported as negative. The CV now uses the absolute value of the mean.
  • Manual lim_sup / lim_inf removed observations outside the range and altered the boxplots. Limits now use coord_cartesian() (zoom only).
  • Statistical power was underestimated with blocks or factor2; it now uses partial eta squared (identical results in one-way models).
  • Numeric levels (e.g. doses 0, 50, 100, 150) were ordered as text; they are now ordered numerically, and factor levels are respected.
  • $tabla columns and $stats rows now follow the facet order defined by grupo1_orden / grupo2_orden.
  • Empty cells are shown instead of NA in $tabla when treatments are nested within groups.
  • LaTeX \makecell headers in $tabla no longer split labels that contain "_".

Improvements

  • A message now lists factor levels that are excluded because they are not included in orden_factor, grupo1_orden or grupo2_orden.
  • CV and Power are reported in every route (computed from the classic ANOVA fit).
  • The ANOVA row of $tabla shows significance stars only for route A; other routes show "-".
  • Example 5 of agrobox() wrapped in \donttest{} to keep example run time within CRAN limits.

Deprecated

  • 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.

Changes in results compared with 0.3.0

  • Panels that previously showed means without letters (e.g. failed normality) now receive letters through routes B, C or D.
  • Games-Howell letters may differ where groups overlap (bug fix above).
  • Statistical power changes in models with block or factor2.
  • Route A results (means, letters, ANOVA, CV) are unchanged.

Dependencies

  • Added officer and rvg to Suggests (only required by agroppt()).

---

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.3 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-09-08
  • ERROR12 OK, 1 ERROR2026-09-07
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
Show 2 earlier changesHide 2 earlier changes
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.4.0
READMEYes · 1,346 wordsVignettesNoNEWSYes · 100% structured · mentions 0.4.0Citation fileNo
Help pages
7
Examples that run
50%2 run in a plain check (1 of them under a condition) · 2 never run
Exported functions with examples
80%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

5.8K
CRAN downloads in the past year
Rank #6,157 · ~16/day · ~487/mo
Daily download trend is not available in this view yet.
53630 days
1.4K90 days
5.8K1 year
Compare downloads with other packages →
Also on115 r2u38 autocran

Repository

0Stars
0Forks
0Open issues
0Open PRs
0Releases
Last activity 2026-10-05
Responsiveness
not measured
PracticesBeta

6 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/joa3aquin50/agrobox on 2026-10-22.

Continuous integration (1)
GitHub Actions
Docs source (1)
README.Rmd
Reproducibility and dev environment (1)
data-raw/
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Show all practicesHide 1 practice
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
17 external dependencies (excludes base and recommended)

Installing agrobox adds 68 packages (35 with compiled code, 62 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, doBy 4.3 MB.

Depends (1)
R >= 3.5.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 0.1.0 (2025)
Listed in earlier versions (1)
Salinas Angeles
no longer listed · 0.1.0 to 0.4.0
Releases (5)

Pick two releases to compare their code metrics.

  • 0.4.0Latest
    record
    2026-10-05 · current release · diff ↗ ·
    added 1 export
    agroppt
  • R
    R 4.6.0 released · 2026-04-24
  • 0.3.0
    record
    2026-04-13 · diff ↗
  • 0.2.1
    record
    2026-01-11 · diff ↗
  • 0.2.0
    record
    2026-01-08 · diff ↗ ·
    added 3 exports
    agroexcel, agrosintesis, agrotabla
  • 0.1.0
    record
    2025-11-19
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2025-11-19
Total releases
5 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.5.0
Bundled data
7.0 KB / 2 files
Download size
51 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("agrobox")
Salinas Angeles, J. A. (2026). agrobox: Data Visualization and Statistical Tools for Agroindustrial Experiments (Version 0.4.0) [Computer software]. https://doi.org/10.32614/CRAN.package.agrobox

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for agrobox version 0.4.0 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy