linear_filter {xnet}R Documentation

Fit a linear filter over a label matrix

Description

This function fits a linear filter over a label matrix. It calculates the row, column and total means, and uses those to construct the linear filter.

Usage

linear_filter(y, alpha = 0.25, na.rm = FALSE)

Arguments

y

a label matrix

alpha

a vector with 4 alpha values, or a single alpha value which then is used for all 4 alphas.

na.rm

a logical value indicating whether missing values should be removed before calculating the row-, column- and total means.

Details

If there are missing values and they are removed before calculating the means, a warning is issued. If na.rm = FALSE and there are missing values present, the outcome is, by definition, a matrix filled with NA values.

Value

an object of class linearFilter

Examples

data(drugtarget)
linear_filter(drugTargetInteraction, alpha = 0.25)
linear_filter(drugTargetInteraction, alpha = c(0.1,0.1,0.4,0.4))


[Package xnet version 0.1.11 Index]