reload,RnBDiffMeth-method {RnBeads} | R Documentation

## reload-methods

### Description

reload disk dumped tables. Useful if the table files are manually copied or if the object is loaded again.

### Usage

    ## S4 method for signature 'RnBDiffMeth'
    reload(
      object,
      save.file,
      disk.path = tempfile(pattern = "diffmeth_", tmpdir = getOption("fftempdir"))
    )

### Arguments

`object` | `RnBDiffMeth` object
`save.file` | location of the ff data saved to disk (i.e. save in save.RData and save.ffData)
`disk.path` | path on the disk for DMTs. can be new or be the same as in the original object

### Value

the updated RnBDiffMeth object

### Author(s)

Fabian Mueller

### Examples

    library(RnBeads.hg19)
    data(small.example.object)
    logger.start(fname=NA)
    #compute differential methylation
    pcols <- c("Sample_Group","Treatment")
    tdir <- tempfile(pattern="working")
    dm <- rnb.execute.computeDiffMeth(rnb.set.example,pcols,disk.dump=TRUE,disk.dump.dir=tdir)
    #get temporary file names
    fn.save.tabs <- tempfile(pattern="saveTables")
    fn.save.obj  <- tempfile(pattern="saveObject")
    #save the object and the tables to disk
    save(dm,file=fn.save.obj)
    save.tables(dm,fn.save.tabs)
    #delete the object from the workspace
    destroy(dm)
    rm(dm)
    #reload the object and tables
    load(fn.save.obj)
    dm.new <- reload(dm,fn.save.tabs)

[Package RnBeads version 2.10.0 Index]