dodecBlock | R Documentation |
Generates a block of n dodecahedra where the vertices of each dodecahedron represent a landmark configuration with p = 20 points in k = 3 dimensions. The data block is transformed using generalized Procrustes analysis.
dodecBlock( n = 10, dist_x = NULL, dist_y = NULL, dist_z = NULL, theta_x = NULL, theta_y = NULL, theta_z = NULL, size = NULL, noise = NULL, vertex_shift = NULL, plot = FALSE )
n |
the number of configurations to generate for the data block. Default is 10. Must be 2 or greater. |
dist_x, dist_y, dist_z |
optional integer or vector to specify a distance along the stated axis (i.e. |
theta_x, theta_y, theta_z |
optional integer or vector to specify an angle for rotating the configuration about its origin in the stated axis (i.e. |
size |
optional integer or vector for scaling the configurations. If no value is specified then configurations will not be scaled relative to one another. If a single integer is supplied (e.g. |
noise |
optional integer for introducing noise to the configurations. If no value is specified then |
vertex_shift |
optional integer or vector to specify a distance along the z axis for translating the first vertex in each configuration. This argument can be used to introduce variation into the data block. If no value is specified then vertex 1 in each configuration will not be translated. If a single integer is supplied (e.g. |
plot |
a logical value indicating whether the configurations should be plotted. Default is FALSE. |
dodecBlock
builds a data block of configurations that have been transformed using generalized Procrustes analysis. The resulting data block is a three dimensional array with n = 2 or greater configurations, with each configuration represented by p = 20 points that have k = 3 dimensions. Several objects are calculated for downstream analyses including centroid sizes for each configuration.
formatBlock
uses the cSize
function from the Morpho
package (Schlager 2017), and the gpagen
, two.d.array
and arrayspecs
functions from the geomorph
package (Adams and Ot?rola-Castillo 2013).
a 'blockList' object of n dodecahedra, used for downstream analyses. The list contains the elements:
raw |
configurations without Procrustes transformation |
gpa.3D |
configurations after Procrustes transformation organised into a 3D array |
gpa.2D |
configurations after Procrustes transformation organised into a 2D matrix |
centroid |
centroid sizes of the configurations |
p |
number of points in the configurations of each data block |
k |
number of dimensions that the points in each configuration has |
n |
number of configurations included in each data block |
Adams DC, Ot?rola-Castillo E. 2013. geomorph: an R package for the collection and analysis of geometric morphometric shape data. Methods in Ecology and Evolution 4:393-399 https://doi.org/10.1111/2041-210X.12035
Schlager S. 2017. Morpho and Rvcg-shape analysis in R. In Zheng G, Li S, Sz?kely (eds.) Statistical shape and deformation analysis. Academic Press, London. Pp. 217-256.
# Example 1: Generate a block with ten configurations block <- dodecBlock() # Example 2: Generate a block with five configurations. # Rotate the configurations and translate the first vertex in each configuration. # Plot the result. block2 <- dodecBlock(n = 5, theta_z = seq(from = 0, to = 270, by = 60), vertex_shift = 0:4, plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.