weecology / LDATS

Latent Dirichlet Allocation coupled with Bayesian Time Series analyses
https://weecology.github.io/LDATS
Other
25 stars 5 forks source link

Plotting full model set first triggers plotting selected model to prompt for next plot #118

Closed ethanwhite closed 5 years ago

ethanwhite commented 5 years ago

Plotting a single LDA model (e.g., the last command in Stage 1 of the vignette) is expected to produce a single plot. Plotting the full set of models produces a bunch of plots that are incremented over using a prompt. However, if I accidentally try plotting the full set of models, escape out of the prompt, and then plot the single model I want, I get a prompt even though there is only one plot and that plot isn't displayed until I hit .

library(LDATS)
data(rodents)
lda_model_set <- LDA_set(document_term_table = rodents$document_term_table,
                         topics = c(2:6),
                         nseeds = 5,
                         control = LDA_controls_list(quiet = TRUE))
selected_lda_model <- select_LDA(lda_model_set)
plot(lda_model_set) # Accidentally plot the full set of models
> plot(selected_lda_model[[1]])
Hit <Return> to see next plot: