matrices.shift.apply.function: Shift two matrices against each other and apply function to...

Description Usage Arguments Details Value

View source: R/advanced.matrix.functions.R

Description

Shift two matrices against each other and apply a function to the overlap

Usage

1
2
matrices.shift.apply.function(mbase, mshift, func, keepbasedim = FALSE,
  radial = FALSE, na.value = -99999)

Arguments

mshift, mbase

matrices of to be shifted against each other. NAs are allowed, see argument na.value.

func

character. One of "rmse" or "multav". See details.

keepbasedim

logical. Only shift mshift as much that the center stays inside mbase. This results in an output matrix of equal shape like mbase. Handy for sliding means. Defaults to FALSE.

radial

logical. Only shift mshift up to a circle-like shape against mbase. That is, The center of mshift won't exceed the biggest ellipsis fitting into the center of mbase. This results in an output matrix of equal shape like mbase with NAs in the edges. Handy for circular images.

na.value

integer. The value used internally in FORTRAN for NAs. Make sure this value does not appear in neither mbase nor mshift. Defaults to -99999.

Details

Matrix mshift is shifted against mbase and the overlapping matrices passed to fun. The return value of selected function func is put into the resulting matrix at the position of the shift.

This function uses a FORTRAN implementation for efficiency.

The func argument specifies which type of function is to be applied to the overlap. It can be:

Value

a matrix filled with the results of func and row- and colnames that indicate the shift of mshift against mbase.


nobodyinperson/matrixutils documentation built on May 23, 2019, 9:31 p.m.