removeTimePoints: Remove time points from an object of class TP

Description Usage Arguments Value See Also Examples

View source: R/createTimePoints.R

Description

Function for removing selected time points from an object of class TP.

Usage

1
removeTimePoints(TP, timePoints)

Arguments

TP

An object of class TP.

timePoints

A character or numeric vector indicating the time points to be removed. When using a character string to reference a time point, the value has to be an exact match to one of the existing timePoints. When using a number it will be matched by its number ("timeNumber") in the timePoints attribute of the TP object.

Value

An object of class TP, the input with the selected time points removed.

See Also

Other functions for data preparation: as.data.frame.TP(), createTimePoints(), getTimePoints(), plot.TP(), summary.TP()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Create a TP object containing the data from the Phenovator.
phenoTP <- createTimePoints(dat = PhenovatorDat1,
                            experimentName = "Phenovator",
                            genotype = "Genotype",
                            timePoint = "timepoints",
                            repId = "Replicate",
                            plotId = "pos",
                            rowNum = "y", colNum = "x",
                            addCheck = TRUE,
                            checkGenotypes = c("check1", "check2",
                                               "check3","check4"))
## Remove the first and last time point from the TP object.
phenoTPNew <- removeTimePoints(phenoTP,
                               timePoints = c(1, 73))

## Compare by looking at summaries.
summary(phenoTP)
summary(phenoTPNew)

statgenHTP documentation built on Sept. 15, 2021, 5:06 p.m.