dataToTimeSeries: Data to time-series

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Function that splits data to time series for each replicate included.

Usage

1

Arguments

X

a data matrix or data.frame where columns correspond to samples and rows to features.

timepoint

a vector of length equal to ncol(X) indicating the time variable corresponding to the sample (data column).

group

a vector of length equal to ncol(X) indicating the group membership corresponding to the sample (data column).

replicate

a vector of length equal to ncol(X) indicating the replicate variable corresponding to the sample (data column).

Value

a data.frame with ordered time series for each replicate.

Examples

1
2
3
4
5
6
X <- matrix(rnorm(1000), ncol = 50)
group <- rep(c("A", "B"), each = 25)
replicate <- rep(paste0("rep", 1:5), each = 5)
time <- rep(1:5, 10)
tc <- dataToTimeSeries(X, time, replicate, group)
head(tc)

nlhuong/vistimeseq documentation built on Sept. 4, 2021, 2:41 a.m.