Learn R Programming

Momocs (version 1.4.1)

def_ldk_angle: Add new landmarks based on angular positions

Description

A wrapper on coo_intersect_angle and coo_intersect_direction for Out and Opn objects.

Usage

def_ldk_angle(coo, angle)

def_ldk_direction(coo, direction = c("down", "left", "up", "right")[4])

# S3 method for default def_ldk_direction(coo, direction = c("down", "left", "up", "right")[4])

# S3 method for Out def_ldk_direction(coo, direction = c("down", "left", "up", "right")[4])

# S3 method for Opn def_ldk_direction(coo, direction = c("down", "left", "up", "right")[4])

Value

a Momocs object of same class

Arguments

coo

a Out or Opn object

angle

numeric an angle in radians (0 by default).

direction

character one of "down", "left", "up", "right" ("right" by default)

See Also

Typically used before coo_slice and coo_slide. See def_ldk_tips as well.

Examples

Run this code
# adds a new landmark towards south east
hearts %>%
   slice(1:5) %>% # for speed purpose only
   def_ldk_angle(-pi/6) %>%
stack()

# on Out and towards NW and NE here
olea %>%
   slice(1:5) %>% #for speed purpose only
   def_ldk_angle(3*pi/4) %>%
   def_ldk_angle(pi/4) %>%
   stack

Run the code above in your browser using DataLab