validateExtractInfo {methylInheritance} | R Documentation

## Validation of some parameters of the `extractInfo` function

### Description

Validation of some parameters needed by the public `extractInfo` function.

### Usage

    validateExtractInfo(allResults, type, inter, position)

### Arguments

`allResults` | a `list` as created by the `runPermutation` or the `loadAllRDSResults` functions.
`type` | One of the `"sites"` or `"tiles"` strings. Specifies the type of differentially methylated elements should be returned. For retrieving differentially methylated bases `type` = `"sites"`; for differentially methylated regions `type` = `"tiles"`.
`inter` | One of the `"i2"` or `"iAll"` strings. Specifies the type of intersection should be returned. For retrieving intersection results between two consecutive generations `inter` = `"i2"`; for intersection results between three generations or more `inter` = `"iAll"`.
`position` | a positive `integer`, the position in the `list` where the information will be extracted. The position must be an existing position inside `allResults`

### Value

`0` indicating that all parameters validations have been successful.

### Author(s)

Astrid Deschenes

### Examples

    ## Load dataset
    data(methylInheritanceResults)

    ## The function returns 0 when all paramaters are valid
    methylInheritance:::validateExtractInfo(
        allResults = methylInheritanceResults, type = "sites",
        inter = "i2", 2)

    ## The function raises an error when at least one paramater is not valid
    ## Not run: methylInheritance:::validateExtractInfo(
        allResults = methylInheritanceResults, type = "sites",
        inter = "i2", 12)
    ## End(Not run)

[Package methylInheritance version 1.10.0 Index]