transform_coord {rticulate} | R Documentation |
Transform the coordinates of spline data
Description
This function transforms the coordinates of spline data between Cartesian and polar coordinate systems. The origin x and y coordinates can be supplied by the user, or calculated automatically (see Details).
Usage
transform_coord(
data,
to = "polar",
origin = NULL,
fan_lines = c(10, 25),
use_XY = FALSE
)
Arguments
data |
A data set containing the spline coordinates (cartesian coordinates must be in columns named |
to |
Which system to convert to, as a string, either |
origin |
The coordinates of the origin as a vector of |
fan_lines |
A numeric vector with two fan lines (the default is
|
use_XY |
Whether to use the column names |
Details
The transformation between the coordinate systems require the selection of an
origin in Cartesian coordinates (x and y). The origin ideally corresponds to
the virtual origin of the ultrasound waves from the probe. The origin
coordinates can be supplied by the user as a vector with the origin
argument, or they can be estimated automatically if origin = NULL
(the
default). The estimation is performed by get_origin
(see that
function documentation for details).
Value
An object of class tbl_df-class
(a tibble).