Get and setting the stability values for factors
Source:R/methods-FactorisedExperiment.R
stability.Rd
Get and setting the stability values for factors
Usage
# S4 method for class 'FactorisedExperiment'
stability(object)
# S4 method for class 'FactorisedExperiment'
stability(object) <- value
Arguments
- object
FactorisedExperiment object.
- value
New value to replace existing stability vector.
Value
A vector with a value for each factor indicating the factor stability. More details are available from the estimateStability help page.
Examples
# Get a random matrix with rnorm, with 100 rows (features)
# and 20 columns (observations)
X <- ReducedExperiment:::.makeRandomData(100, 20, "feature", "obs")
# Run stabilised ICA on the data with 5 components
fe <- estimateFactors(X, nc = 5, use_stability = TRUE)
stability(fe)
#> factor_1 factor_2 factor_3 factor_4 factor_5
#> 0.9157248 0.8528429 0.8362990 0.8269149 0.5597709
stability(fe)[2] <- 10
stability(fe)
#> factor_1 factor_2 factor_3 factor_4 factor_5
#> 0.9157248 10.0000000 0.8362990 0.8269149 0.5597709