readGPSA | R Documentation |
Reads and organises pseudolandmarks from Generalized Procrustes Surface Analysis (GPSA; Pomidor et al. 2015) into a data block. readGPSA
expects a directory containing a single .dat file containing homologised points for one block of pseudolandmark configurations.
readGPSA(dirpath)
dirpath |
the directory path where a file containing homologised pseudolandmark points will be found. The homologised points file will have a .dat extension and must be produced using the Generalized Procrustes Surface Analysis software tool (Pomidor et al. 2015). |
readGPSA
reads a matrix of pseudolandmark configurations from a .dat file into the R environment and organises the configurations into an array. Several objects are calculated for downstream analyses including centroid sizes for each pseudolandmark configuration. Note that centroid sizes are not calculated for the original meshes processed using GPSA, but are instead calculated for the homologised pseudolandmark points from each of those meshes after processing with GPSA.
readGPSA
is a wrapper function for the fread
function from the data.table
package (Dowle and Srinivasan 2020), the cSize
function from the Morpho
package (Schlager 2017), and the arrayspecs
function from the geomorph
package (Adams and Otárola-Castillo 2013).
a 'block' class object, used for downstream analyses. The list contains the elements:
raw |
collation of pseudolandmark configurations organised as a 2D matrix |
gpa.3D |
pseudolandmark configurations organised into a 3D array |
gpa.2D |
duplication of |
centroid |
centroid sizes of pseudolandmark configurations |
p |
number of pseudolandmarks that each configuration within the data block has |
k |
number of dimensions that each pseudolandmark within the data block has |
n |
number of pseudolandmark configurations included in the 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
Dowle M, Srinivasan A. 2020. data.table: Extension of 'data.frame'. R package version 1.13.4. https://CRAN.R-project.org/package=data.table
Pomidor BJ, Makedonska J, Slice DE. 2016. A landmark-free method for three-dimensional shape analysis. PLoS One 11: e0150368 https://doi.org/10.1371/journal.pone.0150368
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.
## Not run: # For this example to work a directory (/...) containing .dat file must first be prepared. dirpath <- "/..." block1 <- readGPSA(dirpath) block1@p block1@k block1@n ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.