View source: R/sperrorest_misc.R
get_small_tiles | R Documentation |
get_small_tiles
identifies partitions (tiles) that are too
small according to some defined criterion / criteria (minimum number of
samples in tile and/or minimum fraction of entire dataset).
get_small_tiles(tile, min_n = NULL, min_frac = 0, ignore = c())
tile |
factor: tile/partition names for all samples; names must be
coercible to class tilename, i.e. of the form |
min_n |
integer (optional): minimum number of samples per partition_ |
min_frac |
numeric >0, <1: minimum relative size of partition as percentage of sample. |
ignore |
character vector: names of tiles to be ignored, i.e. to be retained even if the inclusion criteria are not met. |
character vector: names of tiles that are considered 'small' according to these criteria
partition_tiles, tilename
# Muenchow et al. (2012), see ?ecuador
# Rectangular partitioning without removal of small tiles:
parti <- partition_tiles(ecuador, nsplit = c(10, 10), reassign = FALSE)
summary(parti)
length(parti[[1]])
# Same in factor format for the application of get_small_tiles:
parti_fac <- partition_tiles(ecuador,
nsplit = c(10, 10), reassign = FALSE,
return_factor = TRUE
)
get_small_tiles(parti_fac[[1]], min_n = 20) # tiles with less than 20 samples
parti2 <- partition_tiles(ecuador,
nsplit = c(10, 10), reassign = TRUE,
min_n = 20, min_frac = 0
)
length(parti2[[1]]) # < length(parti[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.