find_sub: Finds certain subsets of predictors

Description Usage Arguments Value Examples

View source: R/carrot_functions.R

Description

Reorders the columns of matrix a according to the ordered elements of array s

Usage

1
find_sub(a,s,j,c,st)

Arguments

a

A j x N matrix, containing all possible subsets (N overall) of the size j of predictors' indices.

s

array of numbers of the size N

j

number of rows in a

c

array of all indices of the predictors

st

a subset of predictors to be always included into a predictive model

Value

Returns a submatrix of matrix a which consits of columns determined by the input array s

Examples

1
2
3
4
5
6
#all two-element subsets of 1:3

a<-combn(3,2)
s<-c(3,2,3)

find_sub(a,s,2,1:3)

CARRoT documentation built on June 8, 2021, 5:09 p.m.

Related to find_sub in CARRoT...