dataToTimeSeries {TimeSeriesExperiment} | R Documentation |
Function that splits data to time series for each replicate included.
dataToTimeSeries(X, timepoint, group = NULL, replicate = NULL)
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). |
a data.frame with ordered time series for each replicate.
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)