update_pairwise_feature_mat: Remove elder from pairwise feature matrix

Description Usage Arguments Value Examples

View source: R/update_pairwise_feature_mat.R

Description

Remove all columns from pairwise_feature_mat that have elder as one of the features in each pairwise feature

Usage

1
update_pairwise_feature_mat(pairwise_feature_mat, elder)

Arguments

pairwise_feature_mat

a matrix of feature pair score for each sample

elder

character vector (i.e. string) representing the name of the elder feature

Value

returns pairwise feature matrix but without the columns that had pairwise features where one feature was the elder feature

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
C <- 100  # represents samples
R <- 200 # represents features
y <- stats::rnorm(C) # represents outcome variable
X <- matrix(rbeta(R*C, 2, 3), nrow = R)  # simulate data matrix
Is <- get_pairwise_rank_matrices(X)
pairwise_feature_mat <- make_feature_pair_score_matrix(Is)
sorted_corrs <- get_sorted_corrs_pairwise_features(pairwise_feature_mat, y)
elder_corr <- get_elder(sorted_corrs)
elder <- names(elder_corr)
pairwise_feature_mat <- update_pairwise_feature_mat(pairwise_feature_mat, elder)

mdkessler/kTSCR documentation built on Feb. 25, 2021, 10:31 p.m.