Prepare the data for modelling
Arguments
- mat
An integer matrix containing quantitative (not qualitative or binary) count data con interaction frequency (e.g. visits to flowers, number of fruits consumed per plant or species). Plants must be in rows, Animals must be in columns.
- sampl.eff
A numeric vector with the sampling effort (e.g. observation hours) spent on each plant.
Examples
data(web)
prepare_data(web, sampl.eff = rep(20, nrow(web)))
#> $M
#> A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21
#> P1 0 0 3 1 0 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0
#> P2 0 0 12 0 0 0 0 0 0 0 0 0 0 8 0 1 0 0 0 0 1
#> P3 0 0 0 0 1 0 7 0 0 0 0 0 0 2 0 0 5 3 0 0 0
#> P4 0 0 2 0 3 0 0 1 0 0 0 0 0 30 0 0 0 0 0 0 0
#> P5 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0
#> P6 0 0 0 4 1 0 1 0 0 0 1 5 2 0 0 0 0 0 0 0 0
#> P7 3 0 33 0 0 2 6 0 2 0 0 0 0 27 0 0 0 0 0 0 2
#> P8 0 1 1 1 2 0 11 0 0 6 0 0 0 1 2 0 0 0 0 1 0
#>
#> $n_p
#> [1] 8
#>
#> $n_a
#> [1] 21
#>
#> $C
#> [1] 20 20 20 20 20 20 20 20
#>