Learn R Programming

RnBeads (version 1.4.0)

reload,RnBDiffMeth-method: reload-methods

Description

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

Usage

"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

Examples

Run this code

library(RnBeads.hg19)
data(small.example.object)
logger.start(fname=NA)
#compute differential methylation
dm <- rnb.execute.computeDiffMeth(rnb.set.example,pheno.cols=c("Sample_Group","Treatment"),disk.dump=TRUE,disk.dump.dir=tempfile(pattern="working"))
#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)

Run the code above in your browser using DataLab