add_ldk: Adds new landmarks on Out and Opn objects

View source: R/coo-ldk-utilities.R

add_ldkR Documentation

Adds new landmarks on Out and Opn objects

Description

Helps to add new landmarks on a Coo object on top of existing ones. The number of landmarks must be specified and rows indices that correspond to the nearest points clicked on every outlines are stored in the $ldk slot of the Coo object.

Usage

add_ldk(Coo, nb.ldk)

Arguments

Coo

an Out or Opn object

nb.ldk

the number of landmarks to add on every shape

Details

Note that if no landmarks are already defined, then this function is equivalent to def_ldk.

Value

an Out or an Opn object with some landmarks defined

See Also

Other ldk/slidings methods: def_ldk(), def_slidings(), get_ldk(), get_slidings(), rearrange_ldk(), slidings_scheme()

Examples

## Not run: 
hearts <- slice(hearts, 1:5) # to make it shorter to try
# click on 3 points, 5 times.
hearts <- def_ldk(hearts, 3)
# Don't forget to save the object returned by def_ldk...
hearts2 <- add_ldk(hearts, 3)
stack(hearts2)
hearts2$ldk

## End(Not run)

MomX/Momocs documentation built on Nov. 18, 2023, 10:53 p.m.