DataTruncation: DataTruncation

View source: R/DataTruncation.R

DataTruncationR Documentation

DataTruncation

Description

Truncates the functional data (the time series) at a specific time point chosen by the user.

Usage

DataTruncation(
  data,
  feature,
  truncTime = NULL,
  labels = NULL,
  save = FALSE,
  path = NULL
)

Arguments

data

CONNECTORList. (see DataImport)

feature

The column name reported in the AnnotationFile containing the feature to be investigated.

truncTime

A two dimension vector of integers corresponding to the time points where the curves will be truncated. If an integer number is passed, than it will be considered as the upper time point by default.

labels

Vector containing the text for the title of axis names and plot title.

save

If TRUE then the plot of the time series truncated at the "TruncTime" is saved into a pdf file.

path

The folder path where the plot(s) will be saved. If it is missing, the plot is saved in the current working directory.

Value

DataTruncation returns the line plot of time series with a vertical line at the truncation time and the CONNECTORList updated with the following elements: (i) a data frame with three variables (ID curves, observation and time values truncated at the chosen time), (ii) a vector collecting the number of truncated observations collected per sample, a data frame matching curses with the chosen feature, (iv) the vector storing all the truncated time points of the samples (i.e. truncated time grid). Furthermore, it prints an updated summary of the input data, updating the minimum and the maximum curve length after the data truncation.

Author(s)

Cordero Francesca, Pernice Simone, Sirovich Roberta

Examples


TimeSeriesFile<-"data/475dataset.xls"
AnnotationFile <-"data/475info.txt"

CONNECTORList <- DataImport(TimeSeriesFile,AnnotationFile)

CONNECTORList<- DataTruncation(CONNECTORList,"Progeny",truncTime=50,labels = c("time","volume","Tumor Growth"))
CONNECTORList<- DataTruncation(CONNECTORList,"Progeny",truncTime=c(20,50),labels = c("time","volume","Tumor Growth"))


sysbioTurin/connector documentation built on April 9, 2024, 12:10 p.m.