The function divides the sample columns by a reference column. The sample
and reference columns are defined based on the provided
variable and on regular expression matching.
divideByReference(object, i, colvar, samplePattern = ".", refPattern)
character() vector indicating from which
rowData should be taken.
character(1) indicating the variable to take from
colData(object) that gives the sample annotation.
character(1) pattern that matches the sample
colvar. By default all samples are devided (using the
character(1) pattern that matches the carrier
colvar. Only one match per assay is allowed, otherwise
only the first match is taken
The supplied assay(s) are replaced with the values computed after reference division.
data("scp1") scp1 <- divideByReference(scp1, i = 1, colvar = "SampleType", samplePattern = "Macrophage", refPattern = "Ref")