weecology / LDATS

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

plot not working with simplified example #116

Closed ethanwhite closed 5 years ago

ethanwhite commented 5 years ago

Simplifying the example in the README to get a reasonable run time results in an error when calling plot

library(LDATS)
data(rodents)
dtt <- rodents$document_term_table
dct <- rodents$document_covariate_table
weights <- document_weights(dtt)
TS_controls <- TS_controls_list(timename = "newmoon")
controls <- LDA_TS_controls_list(TS_control = TS_controls)
r_LDATS <- LDA_TS(dtt, dct, topics = 2:5, nseeds = 2,
                  formulas = c(~1), nchangepoints = 1,
                  weights = weights, control = controls)

The plot:

> plot(r_LDATS)
Error in `[.data.frame`(x$"Selected TS model"$data, , tname) : 
  undefined columns selected