testregion: METHYLATION DIFFERENECE & TESTING FOR 1 REGIONID
Description
Serves as a wrapper for calc_stats. calc_stats is a generic function using row numbers of adjacent probes which are to be queried for their difference in methylation levels between samples. testregion() identifies the row numbers of probes included in a specific regionID x and then calls calc_stats. It returns the difference in methylation level for region x and (if appropriate) the results of formal tests that evaluate this difference.
If TRUE, the function returns a formatted data frame with statistics regarding the region. If FALSE, it returns a basic vector. This is more computationally efficient if testregion is used in a loop (like in DMRforPairs).
Value
Data frame or vector (depending on the setting of do.format) with statistics and test results concerning region x. For specification, please see calc_stats.
Details
This function is rarely called by the user directly.
#testregion() is an integrated part of the DMRforPairs() wrapper and is #not usually called by the user directly. Please see this function for #an example.