The `freq_comb()` function extracts the combinational frequency of species. `freq_comb()` is minor and features in the vignette to assist users visualize their data.
Arguments
- data
data.frame with the frequency of species combinations.
- type
Character. Supply either `"Grid"` or `"Transect"`.
- dim_max
Numeric. Number of sampling units in one row of a `"Grid"` or `"Transect"`.
Examples
# Training data (see package vignette S.9)
s9 <- data.frame(
Species = c("A", "D", "B", "B", "E", "C", "B", "A"),
Y = c(1, 1, 2, 2, 2, 3, 3, 3),
X = c(2, 3, 1, 2, 2, 1, 1, 3)
)
# create data.frame counting the species combinations
freq_comb(
data = s9,
type = "Grid",
dim_max = 3
)
#> combinations Freq
#> 1 A 22.22222
#> 2 B 11.11111
#> 3 B, C 11.11111
#> 4 B, E 11.11111
#> 5 D 11.11111
#> 6 Empty 33.33333