SelectFeaturesRW: SelectFeaturesRW

View source: R/SelectFeaturesRW.R

SelectFeaturesRWR Documentation

SelectFeaturesRW

Description

Finds the important variables presenting a coordinated response in all the replicate-blocks

Usage

SelectFeaturesRW(
  RW = RW,
  results = results,
  ndim = NULL,
  blocks = NULL,
  threshold_cor = 1,
  threshold_cov = 1,
  mean.RW = T,
  plots = "NO"
)

Arguments

RW

The object used as input in the ComDim analysis.

results

The output object obtained in the ComDim analysis.

ndim

The number of the component for which the most important variables are to be calculated.

blocks

A vector with the indices or the names for the replicate blocks of the same data type.

threshold_cor

The "times" parameter used to calculate the threshold in the following formula: cor(variable) > times * sd(cor(variables)). Minimal value that can be assigned to threshold_cor is 1.

threshold_cov

The "times" parameter used to calculate the threshold in the following formula: cov(variable) > times * sd(cov(variables)). Minimal value that can be assigned to threshold_cor is 1.

mean.RW

Logical value to indicate whether the RW data must be mean-centered (TRUE) or not (FALSE).

plots

Parameter to indicate whether a plot must be produced. Possible values are "NO" for no plots, "separated" for plotting each plot individually, and "together" to plot all the plots in the same grid.

Value

An object with 2 lists. The first list contains the important variables presenting a positive relationship with the scores, while the second list contains the most important variables presenting a negative relationship.

Examples

 b1 = matrix(rnorm(500),10,50)
 batch_b1 = rep(1,10)
 b2 = matrix(rnorm(800),30,80)
 batch_b2 = c(rep(1,10),rep(2,10),rep(3,10))
 mb <- BuildMultiBlock(b1, batches = batch_b1)
 mb <- BuildMultiBlock(b2, growingMB = mb, batches = batch_b2, equalSampleNumber = FALSE)
 rw <- SplitRW(mb)
 results<-ComDim_PCA(rw, 2) # In this analysis, we used 2 components.
 features <- SelectFeaturesRW(RW = rw, results = results, ndim = 1, blocks = c(2,3,4))

f-puig/R.ComDim documentation built on Feb. 20, 2024, 6:49 a.m.