loadAllRDSResults {methylInheritance} | R Documentation

## Load all RDS files created by the permutation and observation analysis

### Description

Load all RDS files created by the permutation and observation analysis. The function returns an object of `class` "methylInheritanceAllResults" that holds all the pertinent information.

### Usage

    loadAllRDSResults(analysisResultsDir, permutationResultsDir,
      doingSites = TRUE, doingTiles = FALSE, maxID = NA)

### Arguments

`analysisResultsDir` | a `character` string, the path to the directory that contains the analysis results. The path can be the same as for the `permutationResultsDir` parameter. When `NULL`, the observation results are not loaded. Default = `NULL`.
`permutationResultsDir` | a `character` string, the path to the directory that contains the permutation results. The path can be the same as for the `analysisResultsDir` parameter. When `NULL`, the permutation results are not loaded. Default = `NULL`.
`doingSites` | a `logical`, the data related to differentially methylated sites are loaded when `doingSites` = `TRUE`. Default: `TRUE`.
`doingTiles` | a `logical`, the data related to differentially methylated tiles are loaded when `doingTiles` = `TRUE`. Default: `TRUE`.
`maxID` | `NA` or a positive `integer`, the maximum identification number of the permutation files to be loaded. When `NA`, all files present in the directory are loaded. Default: `NA`.

### Value

a `list` of class `methylInheritanceAllResults` containing the result of the observation analysis as well as the results of all the permutations.

### Author(s)

Astrid Deschenes, Pascal Belleau

### See Also

`mergePermutationAndObservation` for detail description, in the Value section, of the `methylInheritanceAllResults` object.

### Examples

    ## Get the name of the directory where files are stored
    filesDir <- system.file("extdata", "TEST", package="methylInheritance")

    ## Load information from files
    results <- loadAllRDSResults(analysisResultsDir = filesDir,
        permutationResultsDir = filesDir, doingSites = TRUE, doingTiles = TRUE)

    ## Print the observation results
    results

    ## Access the results for the first permutation only for sites
    results$PERMUTATION[[1]]$SITES

[Package methylInheritance version 1.11.0 Index]