flip_coords_df: Flip coordinate variables

View source: R/f.R

flip_coords_dfR Documentation

Flip coordinate variables

Description

Flip coordinate variables in a data.frame.

Usage

flip_coords_df(
  df,
  axis,
  ranges,
  xvars = c("x", "xend", "col", "imagecol"),
  yvars = c("y", "yend", "row", "imagerow"),
  verbose = FALSE,
  error = FALSE,
  ...
)

Arguments

df

Data.frame with numeric coordinate variables.

axis

Character value. Denotes the axis around which the coordinates are flipped. Either x or y to adress the coordinate variables specifically or h (horizontal, flips y-coords) or v (vertical - flips x-coords).

ranges

A named list as returned by getImageRange(). Must at least have one slot that is named like input for axis. This slot should be a numeric vector of length two. First value being the axis minimum and the second value being the axis maximum.

xvars, yvars

Character vector. Names of the data.frame variables that contain axis coordinates. If some of the names are not present in the input data.frame: Depending on the input of verbose and error the functions silently skips flipping, gives feedback or throws an error.

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

error

Logical. If TRUE and the input is invalid the function throws an error.

...

Used to absorb deprecated arguments or functions.

Value

Adjusted data.frame.


kueckelj/SPATA2 documentation built on March 16, 2024, 10:25 a.m.