Learn R Programming

Momocs (version 1.0.0)

calibrate_deviations: Quantitative calibration, through deviations, for Out and Opn objects

Description

Calculate deviations from original and reconstructed shapes using a range of harmonic number.

Usage

calibrate_deviations(x, method, id, range, norm.centsize, dist.method, dist.nbpts)

Arguments

x
and Out or Opn object on which to calibrate_deviations
method
any method from c('efourier', 'rfourier', 'tfourier') and 'dfourier'.
id
the shape on which to perform calibrate_deviations
range
vector of harmonics (or degree for opoly and npoly on Opn) on which to perform calibrate_deviations. If not provided, the harmonics corresponding to 0.9, 0.95 and 0.99 are used.
norm.centsize
logical whether to normalize deviation by the centroid size
dist.method
a method such as edm_nearest to calculate deviations
dist.nbpts
numeric the number of points to use for deviations calculations

Value

a ggplot object

Details

For *poly methods on Opn objects, the deviations are calculated from a degree 12 polynom.

See Also

Other calibration: calibrate_harmonicpower, calibrate_r2, calibrate_reconstructions

Examples

Run this code
data(bot)
calibrate_deviations(bot)
## Not run: 
# 
# # on Opn
# data(olea)
# camibrate_deviations(olea)
# 
# # lets customize the ggplot
# library(ggplot2)
# gg <- calibrate_deviations(bot, id=1:20)$gg
# gg + geom_hline(yintercept=c(0.001, 0.005), linetype=3)
# gg + labs(col="Number of harmonics", fill="Number of harmonics",
#            title="Harmonic power") + theme_bw()
# gg + coord_polar()
# ## End(Not run)

Run the code above in your browser using DataLab