Skip to contents

A simple wrapper around coo_sample

Usage

coo_sample_prop(coo, prop = 1)

Arguments

coo

either a matrix of (x; y) coordinates or an Out or an Opn object.

prop

numeric, the proportion of points to sample

Value

a matrix of (x; y) coordinates, or an Out or an Opn object.

Details

As for coo_sample if an $ldk component is defined, it is changed accordingly by multiplying the ids by n over the number of coordinates.

Examples

# single shape
bot[1] %>% coo_nb()
#> [1] 138
bot[1] %>% coo_sample_prop(0.5) %>% coo_nb()
#> [1] 69