aggregated_input {rBiasCorrection} | R Documentation |
aggregated_input helper function
Description
Internal function to present aggregated input data on which calculations are performed. This function does only have an effect, if repeated measurements are used for calibration a/o experimental data.
Usage
aggregated_input(datatable, description, vec_cal, type = NULL)
Arguments
datatable |
A data.table object that contains either the experimental data or the calibration data. |
description |
A character string, indicating if |
vec_cal |
The vector containing the CpG columns (output of 'clean_dt' with description = "calibration"). |
type |
A single integer. Type of data to be corrected: either "1" (one locus in many samples, e.g. pyrosequencing data) or "2" (many loci in one sample, e.g. next-generation sequencing data or microarray data). |
Value
A data.table in the long format with aggregated means for each CpG site of each sample and the corresponding standard deviation.
Examples
experimental <- rBiasCorrection::example.data_experimental
calibration <- rBiasCorrection::example.data_calibration
vec_cal <- calibration$vec_cal
experimental_aggregated <- aggregated_input(
datatable = experimental$dat,
description = "experimental",
vec_cal = vec_cal,
type = 1
)
dim(experimental_aggregated)
class(experimental_aggregated)
calibration_aggregated <- aggregated_input(
datatable = calibration$dat,
description = "calibration",
vec_cal = vec_cal
)
dim(calibration_aggregated)
class(calibration_aggregated)