comboList: Produces all possible combinations of a set of linear model...

Description Usage Arguments Details Value Author(s) Examples

Description

Produces a list representing all possible combinations of linear model predictors

Usage

1
comboList(n.pred, outFile = NULL, njobs = 1)

Arguments

n.pred

integer indicating the number of predictors

outFile

text string indicating the .Rdata file to which the returned list of predictor combinations will be saved. If NULL, then no file is saved.

njobs

Integer indicating the number of parallel jobs to be used in calculating the combinations, using parLapply

Details

Uses combn to identify the combinations.

Value

A list of class combolist is invisibly returned with the two components shown below. If outFile is not NULL, this same list is saved to outFile:

len

The total number of combinations

pList

A list where each element contains an integer representation of one combination of the predictors

Author(s)

Landon Sego

Examples

1
2
3
4
5
6
7
8
x <- comboList(4)
print(x)

# A parallel job
y <- comboList(4, njobs = 2)

# Should be equal
identical(x, y)


Search within the Smisc package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.