prep.data: Preparing Data

Description Usage Arguments Value Author(s) Examples

View source: R/prep_data.R

Description

This function prepares the data to compute correlation by introducing NA's when lags are needed

Usage

1
prep.data(data, lags, timepoints)

Arguments

data

a matrix or data frame with rows representing genes and columns representing different timepoints. If data is a data frame, the gene names can be specified using the row.names().

lags

a vector of same length as the number of rows in the data column indicating the best lags

timepoints

a vector of time points used in the dataset

Value

a list of two matrices, one matrix with NA's for the lags for the dataset and another matrix with the timepoints used for each row in the dataset

Author(s)

Thevaa Chandereng, Anthony Gitter

Examples

1
2
3
4
prep.data(array(rnorm(20), c(5, 4)), c(0, 0, 0, -1, 1),
          timepoints = c(0, 5, 15, 30))
prep.data(array(runif(100, 0, 10), c(10, 10)), sample((-2:2), size = 10, replace = TRUE),
          timepoints = c(0, 5, 15, 30, 45, 60, 75, 80, 100, 120))

gitter-lab/LPWC documentation built on May 7, 2020, 2:02 p.m.