Learn R Programming

Momocs (version 1.1.6)

tps2coo: Reads a single tps-like shape as lines

Description

Internal function used in import_tps that may be useful for data import. When provided with lines (eg after readLines) from a tps-like description (with "LM", "CURVES", etc.) returns a list of coordinates, curves, etc.

Usage

tps2coo(tps, curves = TRUE)

Arguments

tps
lines, typically from readLines, describing a single shape in tps-like format
curves
logical whether to read curves, if any

Value

a list with components: coo a matrix of coordinates; cur a list of matrices; scale the scale as a numeric.

Details

if curves are present add them to $coo (with the proper combination of do.call, rbind, then use def_slidings or define a slidings matrix (see Ldk).

See Also

Other babel functions: bind_db, chc2Out, chc2pix, import_StereoMorph_curve1, import_jpg, import_tps, nef2Coe, ntsrow2Coo, pix2chc, tie_jpg_txt

Examples

Run this code
## Not run: ------------------------------------
# # let's imagine this command works fine
# coo <- import_tps(...)
# # then you can
# Ldk(coo)
## ---------------------------------------------

Run the code above in your browser using DataLab