ASCA_trim_vars

ASCA_trim_vars(decomposition, keep = NULL)

Arguments

decomposition

a list of decomposition matrices produced by `ASCA_decompose` or `ASCA_combine_terms`

keep

a vector of numbers or names indicating the variables which should be kept

Value

a list of reduced matrices

Examples


## load the data
data("synth_count_data")

## perform the ASCA decomposition
dec_test <- ASCA_decompose( d = synth_count_data$design,
x = synth_count_data$counts, 
f = "time + treatment + time:treatment",
glm_par = list(family = poisson())
)

## keep only the forst six species 

trimmed_dec <- ASCA_trim_vars(dec_test$decomposition, 1:6)