read.tps | R Documentation |
A wrapper function for readland.tps
, which reads a tps
file to
obtain landmark coordinates.
read.tps( file, specID = "ID", negNA = FALSE, readcurves = FALSE, warnmsg = TRUE, extract.id.metadata = TRUE, keep.original.ids = FALSE, show.plot = TRUE, square = TRUE, links = NULL, text.color = "darkred", line.color = "darkgray", reflect.specimens = FALSE, top.pt = NULL, bottom.pt = NULL, left.pt = NULL, right.pt = NULL, verbose = TRUE )
If extract.id.metadata = TRUE
(the default) then the function will extracts
metadata embedded in the ID lines based on the separator and metadata factor names
described in the header of the tps
file. If reflect.specimens = TRUE
then the function will also re-orient specimens using align.reflect
.
Returns a list with several elements: coords
, containing a 3-dimensional array
of shape coordinates; and landmark.number
and specimen.number
,
containing integer values.
scaled
is a logical flag for whether scaling has been applied to shape coordinates.
Data provenance is incluided in an element, provenance
,
which is itself a list recording data manipulations made by functions in the
borealis
package.
Dave Angelini david.r.angelini@gmail.com [aut, cre]
Rohlf, FJ. 2015. The tps series of software. Hystrix 26, 9–12. (Link)
Geomorph: Software for geometric morphometric analyses. R package version 3.2.1. D.C. Adams and M.L. Collyer and A. Kaliontzopoulou. 2020. (Link)
shapes <- read.tps("sample.tps", show.plot = FALSE) shapes <- read.tps("sample.tps") shapes <- read.tps("sample.tps", links = "chull") shapes <- read.tps("sample.tps", links = "chull", reflect.specimens = TRUE, verbose = FALSE) names(shapes) shapes$landmark.number shapes$specimen.number cat(shapes$provenance)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.