Skip to contents

coo_range simply returns the range, coo_range_enlarge enlarges it by a k proportion. coo_diffrange return the amplitude (ie diff after coo_range)

Usage

coo_range(coo)

# S3 method for default
coo_range(coo)

# S3 method for Coo
coo_range(coo)

coo_range_enlarge(coo, k)

# S3 method for default
coo_range_enlarge(coo, k = 0)

# S3 method for Coo
coo_range_enlarge(coo, k = 0)

# S3 method for list
coo_range_enlarge(coo, k = 0)

coo_diffrange(coo)

# S3 method for default
coo_diffrange(coo)

# S3 method for Coo
coo_diffrange(coo)

# S3 method for list
coo_diffrange(coo)

Arguments

coo

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

k

numeric proportion by which to enlarge it

Value

a matrix of range such as (min, max) x (x, y)

Examples

bot[1] %>% coo_range # single shape
#>       x    y
#> min  33   14
#> max 316 1102
bot    %>% coo_range # Coo object
#>       x    y
#> min   8    3
#> max 345 1120

bot[1] %>% coo_range_enlarge(1/50) # single shape
#>          x       y
#> min  27.34   -7.76
#> max 321.66 1123.76
bot    %>% coo_range_enlarge(1/50) # Coo object
#>          x       y
#> min   1.26  -19.34
#> max 351.74 1142.34