mergeObj: merges eNetXplorer objects with different alphas

View source: R/mergeObj.R

mergeObjR Documentation

merges eNetXplorer objects with different alphas

Description

Upon sequential or parallel execution of two or more eNetXplorer runs with different values of the mixing parameter alpha, and assuming the objects from those runs have been saved, this function creates a new eNetXplorer object that merges the alpha values. It currently supports linear (gaussian), logistic (binomial), and Cox regression models.

Usage

mergeObj(source_obj, source_dir=getwd(), dest_obj="eNet_merged.Robj",
dest_dir=NULL)

Arguments

source_obj

Vector with the names of two or more eNetXplorer objects.

source_dir

Source directory. Default is the working directory.

dest_obj

Name of the merged eNetXplorer object.

dest_dir

Destination directory. If not specified, it will use source_dir as default.

Value

An object with S3 class "eNetXplorer".

Author(s)

Julian Candia and John S. Tsang
Maintainer: Julian Candia julian.candia@nih.gov

See Also

eNetXplorer

Examples


# we first generate two objects over different alpha values, then merge them.
# we generate summary PDFs to compare the results before and after merging.
data(QuickStartEx)
working_dir = tempdir()

fit1 = eNetXplorer(x=QuickStartEx$predictor,y=QuickStartEx$response,
family="gaussian",alpha=seq(0,1,by=0.2),save_obj=TRUE,dest_dir=working_dir,
dest_obj="eNet1.Robj",n_run=20,n_perm_null=10,seed=111)
summaryPDF(fit1, dest_file="eNet1.pdf",dest_dir=working_dir)

fit2 = eNetXplorer(x=QuickStartEx$predictor,y=QuickStartEx$response,
family="gaussian",alpha=seq(0.1,0.9,by=0.2),save_obj=TRUE,dest_dir=working_dir,
dest_obj="eNet2.Robj",n_run=20,n_perm_null=10,seed=111)
summaryPDF(fit2, dest_file="eNet2.pdf",dest_dir=working_dir)

eNet_merged=mergeObj(source_obj=c("eNet1.Robj","eNet2.Robj"),source_dir=working_dir)
summaryPDF(eNet_merged,dest_file="eNet_merged.pdf",dest_dir=working_dir)


juliancandia/eNetXplorer documentation built on May 11, 2023, 1:59 a.m.