Combine the objects returned by LDA_set
,
select_LDA
, TS_on_LDA
, and
select_TS
, name them as elements of the list, and
set the class of the list as LDA_TS
, for the return from
LDA_TS
.
package_LDA_TS(LDAs, sel_LDA, TSs, sel_TSs)
LDAs | List (class: |
---|---|
sel_LDA | A reduced version of |
TSs | Class |
sel_TSs | A reduced version of |
Class LDA_TS
-class object including all fitted models and
selected models specifically, ready to be returned from
LDA_TS
.
# \donttest{ data(rodents) data <- rodents control <- LDA_TS_control() dtt <- data$document_term_table dct <- data$document_covariate_table weights <- document_weights(dtt) LDAs <- LDA_set(dtt, 2, 1, control$LDA_set_control) sel_LDA <- select_LDA(LDAs, control$LDA_set_control) TSs <- TS_on_LDA(sel_LDA, dct, ~1, 1, "newmoon", weights, control$TS_control) sel_TSs <- select_TS(TSs, control$TS_control) package_LDA_TS(LDAs, sel_LDA, TSs, sel_TSs) # }