Labels the columns and says how precisely each should be shown, so a table
on screen and the same table in a report agree. Values come back
numeric: the rounding is described rather than applied, because
DT::datatable() needs numbers to stay numbers to sort them, while
knitr::kable() wants them already rounded. round_by() applies the
rounding when that is what you want.
Usage
connectivity_display(x, ...)
# S3 method for class 'connectivity'
connectivity_display(x, ...)
# S3 method for class 'patch_size_tbl'
connectivity_display(x, ...)
# S3 method for class 'compare_connectivity'
connectivity_display(x, wide = TRUE, ...)
# Default S3 method
connectivity_display(x, ...)Value
A list of
data, a tibble with display labels and numeric valuesdigits, a tibble ofcolumn,kind("round"or"signif") anddigits, one row per column that needs rounding
See also
round_by() to apply the rounding.
Examples
lizard <- habitat_connectivity(
habitat = example_habitat(),
barrier = example_barrier(),
species = "Blue Tongue Lizard",
interpatch_distance = 20,
verbose = FALSE
)
display <- connectivity_display(lizard)
display$digits
#> # A tibble: 4 × 3
#> column kind digits
#> <chr> <chr> <dbl>
#> 1 Mesh (ha) round 2
#> 2 P(connected) signif 3
#> 3 Mean area (m2) round 1
#> 4 Total area (ha) round 2
round_by(display)
#> # A tibble: 1 × 8
#> Species `Distance (m)` Patches `Mesh (ha)` `P(connected)` `Mean area (m2)`
#> <chr> <dbl> <int> <dbl> <dbl> <dbl>
#> 1 Blue Tongu… 20 163 4.42 0.0000168 1612.
#> # ℹ 2 more variables: `Total area (ha)` <dbl>, `Resolution (m)` <chr>