allignment: Allignment according to one factor

Description Usage Arguments Details Value

Description

Substracts the mean or median from observations belonging to the same level of a factor.

Usage

1
allignment(response, block, type = c("mean", "median"), ...)

Arguments

response

a numeric vector

block

a factor of the same length as response

type

type of location measure to calculate and substract; only the choices "mean" and "median" are supported

...

further arguments to be passed to mean or median

Details

Splits response according to the levels of block, calculates and substracts the mean or median and returns the resulting vector in appropriate order.

Value

A numeric vector.



Search within the BSagri package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.