Learn R Programming

LPWC (version 0.99.3)

comp.corr: Computing corr

Description

This function computes the weighted correlation with a penalty for lags. It should only be used after the fixed lags have already been applied to the dataset and timepoints using the functions prep.data() and best.lag().

Usage

comp.corr(data, time, C)

Arguments

data

a lagged matrix with rows representing genes and columns representing different timepoints (NA's added when lags are needed)

time

a lagged matrix with rows representing each gene's timepoint and columns representing the number of timepoints, NA is introduced when it is lagged

C

a numeric value of C used in computing weighted correlation

Value

a simmilarity matrix with values between -1 and 1 (1 highly correlated, 0 no correlation)

Examples

Run this code
# NOT RUN {
comp.corr(array(rnorm(40), c(5, 8)), time = t(array(c(0, 5, 10, 15, 20, 25,
30, 35), c(8, 5))), C = 10)

# }

Run the code above in your browser using DataLab