beautils
Field Planning and Biostatistics Utilities
Provides a collection of utility functions for biostatistics, agricultural trial planning, and experimental design. Key features include generating experimental designs (like Latin Square, Alpha-Lattice by Patterson and Williams (1976) <doi:10.2307/2335087>, and Factorial), fieldbook creation, layout sketching, QR code-based label generation, and descriptive statistical tools to easily handle most common descriptive statistics for quantitative variables as described by Field, A., Miles, J., & Field, Z. (2012, ISBN:978-1-4462-0045-2).
README
<!-- README.md is generated from README.Rmd. Please edit that file -->
# beautils <img src="man/figures/logo.png" align="right" height="140/"/>
<!-- badges: start -->
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->
O pacote **beautils** (Bioestatística e Experimentação Agrícola Utils)
fornece funções utilitárias e conjuntos de dados para fins de ensino na
disciplina de Bioestatística e Experimentação Agrícola do curso de
Agronomia da UFSC.
## Instalação
Você pode instalar a versão de desenvolvimento do **beautils** do
[GitHub](https://github.com/) com:
``` r
# install.packages("pak")
pak::pak("nepem-ufsc/beautils")
```
## Exemplo
``` r
library(beautils)
#>
#> Anexando pacote: 'beautils'
#> O seguinte objeto é mascarado por 'package:stats':
#>
#> filter
library(ggplot2)
#> Warning: pacote 'ggplot2' foi compilado no R versão 4.5.2
df <- df_normal()
library(ggplot2)
# Calculando a média e desvio padrão antes para deixar o código do plot limpo
media_comp <- mean(df$length, na.rm = TRUE)
sd_comp <- sd(df$length, na.rm = TRUE)
ggplot(df, aes(x = length)) +
# Histograma com cores mais profissionais
geom_histogram(aes(y = after_stat(density)),
bins = 40,
fill = "steelblue",
alpha = 0.7) +
# Curva Normal Teórica
stat_function(fun = dnorm,
args = list(mean = media_comp, sd = sd_comp),
color = "firebrick",
linewidth = 1.2) +
# Títulos e legendas em português
labs(
x = "Comprimento do grão (mm)",
y = "Densidade",
title = "Distribuição do Comprimento de 86.436 Grãos de Linhaça",
subtitle = "A linha vermelha representa a distribuição normal teórica",
caption = "Fonte: NEPEM 2024"
) +
# Tema limpo e ajustes de texto
theme_minimal(base_size = 14) +
theme(
plot.title = element_text(face = "bold"),
panel.grid.minor = element_blank()
)
```
<img src="man/figures/README-example-1.png" alt="" width="100%" />
``` r
df_eucalipto() |>
group_by(fila) |>
desc_stat(circunferencia)
#> # A tibble: 5 × 11
#> # Groups: fila [5]
#> fila variable cv max mean median min sd.amo se ci.t n.valid
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 F1 circunferencia 16.7 53.3 38.5 38.2 31.5 6.44 1.72 3.72 14
#> 2 F2 circunferencia 14.0 46.5 38.7 39.4 25.2 5.44 1.45 3.14 14
#> 3 F3 circunferencia 17.0 49.2 37.5 36.8 25.3 6.37 1.70 3.68 14
#> 4 F4 circunferencia 17.8 44.1 33.9 33.6 24.5 6.04 1.62 3.49 14
#> 5 F5 circunferencia 31.9 39.5 24.9 21.6 15.4 7.96 2.13 4.60 14
```
Versions across snapshots
| Version | Repository | File | Size |
|---|---|---|---|
0.2.0 |
rolling linux/jammy R-4.5 | beautils_0.2.0.tar.gz |
1.7 MiB |
0.2.0 |
rolling linux/noble R-4.5 | beautils_0.2.0.tar.gz |
2.0 MiB |
0.2.0 |
rolling source/ R- | beautils_0.2.0.tar.gz |
1.7 MiB |
0.2.0 |
latest linux/jammy R-4.5 | beautils_0.2.0.tar.gz |
1.7 MiB |
0.2.0 |
latest linux/noble R-4.5 | beautils_0.2.0.tar.gz |
2.0 MiB |
0.2.0 |
latest source/ R- | beautils_0.2.0.tar.gz |
1.7 MiB |
0.2.0 |
2026-04-23 source/ R- | beautils_0.2.0.tar.gz |
0 B |