View source: R/core-ldk-procrustes.R
fgProcrustes | R Documentation |
Directly borrowed from Claude (2008), called there the fgpa2
function.
fgProcrustes(x, tol, coo)
x |
an array, a list of configurations, or an Out, Opn or Ldk object |
tol |
numeric when to stop iterations |
coo |
logical, when working on |
If performed on an Out or an Opn object, will try to use the $ldk
slot,
if landmarks have been previousy defined, then (with a message) on the $coo
slot,
but in that case, all shapes must have the same number of coordinates (coo_sample may help).
a list with components:
rotated
array of superimposed configurations
iterationnumber
number of iterations
Q
convergence criterion
Qi
full list of Q
Qd
difference between successive Q
interproc.dist
minimal sum of squared norms of pairwise differences between
all shapes in the superimposed sample
mshape
mean shape configuration
cent.size
vector of centroid sizes.
or an Out, Opn or an Ldk object.
Slightly less optimized than procGPA in the shapes package (~20% on my machine).
Will be optimized when performance will be the last thing to improve!
Silent message and progress bars (if any) with options("verbose"=FALSE)
.
Claude, J. (2008). Morphometrics with R. Analysis (p. 316). Springer.
Other procrustes functions:
fProcrustes()
,
fgsProcrustes()
,
pProcrustes()
# on Ldk
w <- wings %>% slice(1:5) # for the sake of speed
stack(w)
fgProcrustes(w, tol=0.1) %>% stack()
# on Out
h <- hearts %>% slice(1:5) # for the sake of speed
stack(h)
fgProcrustes(h) %>% stack()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.