Learn R Programming

Momocs (version 1.0.0)

l2m: Converts a list of coordinates to a matrix of coordinates.

Description

Converts a list with x and y components to a two-columns (colnamed) matrix of coordinates. Also, if l is a list with a single matrix, then l[[1]] is returned.

Usage

l2m(l)

Arguments

l
list with x and y coordinates as components.

Value

matrix of (x; y) coordinates.

See Also

m2l.

Other bridges functions: a2l, a2m, as_df, l2a, m2a, m2d, m2ll, m2l

Examples

Run this code
data(wings)
l <- m2l(wings[1])
l
m <- l2m(l)
m

Run the code above in your browser using DataLab