Skip to contents

Returns TRUE/FALSE whether the sd of angles between all successive radii is below/above thesh

Usage

is_equallyspacedradii(coo, thres)

Arguments

coo

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

thres

numeric a threshold (arbitrarily pi/90, eg 2 degrees, by default)

Value

a single or a vector of logical. If NA are returned, some coordinates are likely identical, at least for x or y.

Examples

bot[1] %>% is_equallyspacedradii
#> [1] NA
bot[1] %>% coo_samplerr(36) %>% is_equallyspacedradii
#> [1] NA
# higher tolerance but wrong
bot[1] %>% coo_samplerr(36) %>% is_equallyspacedradii(thres=5*2*pi/360)
#> [1] NA
# coo_interpolate is a better option
bot[1] %>% coo_interpolate(1200) %>% coo_samplerr(36) %>% is_equallyspacedradii
#> [1] NA
# Coo method
bot %>% coo_interpolate(360) %>% coo_samplerr(36) %>% is_equallyspacedradii
#>         brahma          caney         chimay         corona    deusventrue 
#>             NA             NA             NA             NA             NA 
#>          duvel   franziskaner     grimbergen        guiness     hoegardeen 
#>             NA             NA             NA             NA             NA 
#>        jupiler     kingfisher       latrappe lindemanskriek    nicechouffe 
#>             NA             NA             NA             NA             NA 
#>     pecheresse   sierranevada     tanglefoot          tauro      westmalle 
#>             NA             NA             NA             NA             NA 
#>          amrut    ballantines      bushmills         chivas        dalmore 
#>             NA             NA             NA             NA             NA 
#>   famousgrouse    glendronach   glenmorangie   highlandpark    jackdaniels 
#>             NA             NA             NA             NA             NA 
#>             jb  johnniewalker       magallan     makersmark           oban 
#>             NA             NA             NA             NA             NA 
#>     oldpotrero      redbreast         tamdhu     wildturkey         yoichi 
#>             NA             NA             NA             NA             NA