powered by
Produces a list representing all possible combinations of linear model predictors
comboList(n.pred, outFile = NULL, njobs = 1)
integer indicating the number of predictors
text string indicating the .Rdata file to which the returned list of predictor combinations will be saved. If NULL, then no file is saved.
Integer indicating the number of parallel jobs to be used in calculating the combinations, using parLapplyW
parLapplyW
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:
combolist
outFile
NULL
The total number of combinations
A list where each element contains an integer representation of one combination of the predictors
Uses combn to identify the combinations.
combn
# NOT RUN { x <- comboList(4) print(x) # A parallel job y <- comboList(4, njobs = 2) # Should be equal identical(x, y) # }
Run the code above in your browser using DataLab