This function provides a easy way to regroup recorded data into groups of same number of individuals.
clump(object, ...) # S3 method for intensity clump(object, unit_size, fun = sum, inclusive_unspecified = FALSE, ...)
object | An |
---|---|
... | Additional arguments to be passed to |
unit_size | Size of a group unit. It must be a named vector, with names
corresponding to non-observational variables (i.e. space and time
variables). If the size of a variable in the data set is not a multiple
of the provided value in |
fun | Function used to group observational data together. |
inclusive_unspecified | Not yet implemented. Do unspecified mapped variables (different from i and n) need to be included into the bigger possible sampling unit (TRUE) or splited into as many sampling units as possible (FALSE, default)? |
#> Warning: Computation failed in `stat_summary()`: #> Hmisc package required for this function# Different spatial size units: my_incidence_clumped_1 <- clump(my_incidence, unit_size = c(x = 3, y = 3)) plot(my_incidence_clumped_1, type = "all")#> Warning: Computation failed in `stat_summary()`: #> Hmisc package required for this functionmy_incidence_clumped_2 <- clump(my_incidence, unit_size = c(x = 4, y = 5)) plot(my_incidence_clumped_2, type = "all")#> Warning: Computation failed in `stat_summary()`: #> Hmisc package required for this function# To get mean disease incidence for each plant over the 3 scoring dates: my_incidence_clumped_3 <- clump(my_incidence, unit_size = c(t = 3), fun = mean) plot(my_incidence_clumped_3)