Tests if coordinates likely have equally spaced radii
Source:R/coo-utilities.R
is_equallyspacedradii.Rd
Returns TRUE/FALSE whether the sd of angles between all successive
radii is below/above thesh
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.
See also
Other coo_ utilities:
coo_aligncalliper()
,
coo_alignminradius()
,
coo_alignxax()
,
coo_align()
,
coo_baseline()
,
coo_bookstein()
,
coo_boundingbox()
,
coo_calliper()
,
coo_centdist()
,
coo_center()
,
coo_centpos()
,
coo_close()
,
coo_down()
,
coo_dxy()
,
coo_extract()
,
coo_flipx()
,
coo_force2close()
,
coo_interpolate()
,
coo_is_closed()
,
coo_jitter()
,
coo_left()
,
coo_likely_clockwise()
,
coo_nb()
,
coo_perim()
,
coo_range()
,
coo_rev()
,
coo_right()
,
coo_rotatecenter()
,
coo_rotate()
,
coo_sample_prop()
,
coo_samplerr()
,
coo_sample()
,
coo_scale()
,
coo_shearx()
,
coo_slice()
,
coo_slidedirection()
,
coo_slidegap()
,
coo_slide()
,
coo_smoothcurve()
,
coo_smooth()
,
coo_template()
,
coo_trans()
,
coo_trimbottom()
,
coo_trimtop()
,
coo_trim()
,
coo_untiltx()
,
coo_up()
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