weightMatrix: weightMatrix

Description Usage Arguments Value Examples

View source: R/DCARS.R

Description

the weightMatrix function

Usage

1
weightMatrix(n, type = "triangular", span = NULL, plot = FALSE)

Arguments

n

the number of samples, same as number of columns of data

type

one of "harmonic", "triangular" or "block"

span

proportion of samples to include on either side, default is 0.5

plot

if TRUE, a heatmap of weight matrix will be generated

Value

matrix an n*n matrix is generated corresponding to the weights for each sample

Examples

1
2
3
4
5
weightMatrix(100)
weightMatrix(100, plot = TRUE)
weightMatrix(100, type = "triangular", span = 0.1, plot = TRUE)
weightMatrix(100, type = "block", plot = TRUE)
weightMatrix(100, type = "harmonic", plot = TRUE)

shazanfar/DCARS documentation built on Oct. 14, 2020, 11:11 a.m.