coo_sample.RdChanges the number of shape coordinates.
coo_sample(x, n, from_col, to_col, ...) coo_sample_prop(x, prop, from_col = coo, to_col = coo, ...) coo_interpolate(x, n, from_col, to_col, ...)
| x | |
|---|---|
| n |
|
| from_col | colnames from where to get the coo_list and how to name the resulting one (only for mom_tbl method) |
| to_col | colnames from where to get the coo_list and how to name the resulting one (only for mom_tbl method) |
| ... | useless here |
| prop |
|
a coo_single, coo_list or mom_tbl
coo_sample will return coordinates regularly sampled along the curvilinear abscissa.
The last point will be dropped so that the distance (new last - first) roughly equals
all other distances between consecutive points. This is typically useful for outlines.
coo_sample_curve (todo link) will preserve the first and last points.
This is typically useful for curves, hence the name.
coo_interpolate will upsample the number of points.
All functions have a _prop ally, where n is deduced from the proportion you want to retain.
coo_sample_prop: Sample a proportion of coordinates
coo_interpolate: Interpolates shape coordinates
Other coo_modifyers:
coo_align(),
coo_baseline(),
coo_center(),
coo_reflect,
coo_rev(),
coo_rotatecenter(),
coo_rotate(),
coo_sample_rr(),
coo_scale(),
coo_shear(),
coo_slide(),
coo_split(),
coo_template(),
coo_trans(),
coo_trim(),
coo_up()
#> brahma caney #> 12 12#> brahma caney #> 24 24