Learn R Programming

FMradio (version 1.1.1)

subSet: Subset a data matrix or expression set

Description

subSet is a convenience function that subsets a data matrix or an ExpressionSet object.

Usage

subSet(X, Rf)

Arguments

X

A data matrix or an ExpressionSet object.

Rf

A filtered (correlation) matrix (as returned by the RF function).

Value

Returns a subsetted data matrix or ExpressionSet.

Details

The subSet convenience function may directly follow usage of the RF in the sense that the latters return-value can be used as the Rf argument. It then subsets a data matrix or an ExpressionSet object to those features retained by the redundancy-filtering. The function returns a subsetted matrix or ExpressionSet (depending on the class of the X argument). The subsetted data can then be used for penalty-parameter selection and regularized correlation matrix estimation provided by the regcor function.

References

Peeters, C.F.W. et al. (2019). Stable prediction with radiomics data. arXiv:1903.11696 [stat.ML].

See Also

regcor

Examples

Run this code
# NOT RUN {
## Generate some (high-dimensional) data
## Get correlation matrix
p = 25
n = 10
set.seed(333)
X = matrix(rnorm(n*p), nrow = n, ncol = p)
colnames(X)[1:25] = letters[1:25]
R <- cor(X)

## Redundancy visualization, at threshold value .9
radioHeat(R, diag = FALSE, threshold = TRUE, threshvalue = .9)

## Redundancy-filtering of correlation matrix
Rfilter <- RF(R, t = .9)
dim(Rfilter)

## Subsetting data
DataSubset <- subSet(X, Rfilter)
dim(DataSubset)
# }

Run the code above in your browser using DataLab