coo_slide: Slide coordinates

Description Usage Arguments Details Value See Also Examples

View source: R/coo_modifyers.R

Description

Slides the coordinates so that the id-th coordinate, or a particular landmark, become the first one.

Usage

1
2
3
4
5
6
7
8
9
coo_slide(
  x,
  id,
  ldk,
  from_col = coo,
  ldk_col = ldk,
  to_col = {     {         from_col     } },
  ...
)

Arguments

x

coo_single, coo_list or mom_tbl

id

integer which is (column row) should be used as the first point

ldk

integer which landkmark should be used as the first point

from_col, ldk_col

colnames from where to get the coo_list

to_col

colname where to set the result (default to from_col) and how to name the resulting one (only for mom_tbl method)

...

useless here

Details

For mom_tbl objects, three different flavours exist:

ldk handling is only supported on mom_tbl objects.

Value

a coo_single, coo_list or mom_tbl

See Also

Other coo_modifyers: coo_align(), coo_baseline(), coo_center(), coo_reflect, coo_rev(), coo_rotatecenter(), coo_rotate(), coo_sample_rr(), coo_sample(), coo_scale(), coo_shear(), coo_split(), coo_template(), coo_trans(), coo_trim(), coo_up()

Examples

1
2
3
4
h <- hearts %>% dplyr::slice(1:5) # for speed sake
pile(h)

h %>% coo_slide(ldk=1) %>% pile()

MomX/Momocs2 documentation built on May 13, 2020, 4:28 a.m.