Skip to contents

Extract ids coordinates from a single shape or a Coo object.

Usage

coo_extract(coo, ids)

Arguments

coo

either a matrix of (x; y) coordinates or a Coo object.

ids

integer, the ids of points to sample.

Value

a matrix of (x; y) coordinates, or a Coo object.

Details

It probably only make sense for Coo objects with the same number of coordinates and them being homologous, typically on Ldk.

Examples

coo_extract(bot[1], c(3, 9, 12)) # or :
#>      [,1] [,2]
#> [1,]   40  529
#> [2,]   57  414
#> [3,]   63  361
bot[1] %>% coo_extract(c(3, 9, 12))
#>      [,1] [,2]
#> [1,]   40  529
#> [2,]   57  414
#> [3,]   63  361