Learn R Programming

rearrr (version 0.3.5)

rearrr_fn_: Parent function for documentation inheritance

Description

Do not call. Only used to avoid repetition of documentation.

Usage

rearrr_fn_(
  data,
  origin_fn,
  check_fn,
  allowed_types,
  force_df,
  min_dims,
  overwrite
)

Arguments

data

data.frame or vector.

origin_fn

Function for finding the origin coordinates.

Input: Each column will be passed as a vector in the order of `cols`.

Output: A vector with one scalar per dimension.

Can be created with create_origin_fn() if you want to apply the same function to each dimension.

E.g. `create_origin_fn(median)` would find the median of each column.

Built-in functions are centroid(), most_centered(), and midrange()

check_fn

Function with checks post-preparation of `data` and `col(s)`. Should not return anything.

allowed_types

Allowed types of the `col(s)` columns. The type restrictions do not apply to columns not mentioned in the `col(s)` argument.

force_df

Whether to return a data.frame when `data` is a vector.

min_dims

Minimum number of dimensions (cols) after preparations. When `data` is a vector setting `min_dims` to 2 will use both the index and the values as columns.

overwrite

Whether to allow overwriting of existing columns. (Logical)