cpsievert / LDAvis

R package for web-based interactive topic model visualization.
Other
557 stars 131 forks source link

runShiny error #20

Closed equihuam closed 10 years ago

equihuam commented 10 years ago

I am trying to run the examples but get this error:

Listening on http://127.0.0.1:7258 Joining by: Term Joining by: Error in eval(substitute(expr), envir, enclos) : object 'Freq2' not found Error: object 'Freq2' not found

The issued commands were: z <- with(APdata, check.inputs(K = 40, W = 10473, phi, term.frequency, vocab, topic.proportion)) with(z, runShiny(phi, term.frequency, vocab, topic.proportion))

cpsievert commented 10 years ago

Try starting a new session and run the following:

devtools::install_github("cpsievert/LDAvis")
data("APdata", package = "LDAvis")
z <- with(APdata, check.inputs(K = 40, W = 10473, phi, term.frequency, vocab, topic.proportion))
with(z, runShiny(phi, term.frequency, vocab, topic.proportion))

That being said, we're very close to introducing a new version that will deprecate the runShiny in favor of createJSON, so I encourage you to have a look at createJSON. This doesn't mean you won't be able to take advantage of shiny since it will be fairly easy to embed the viz in a shiny app.

cpsievert commented 10 years ago

By the way you can try out the development version with:

devtools::install_github("cpsievert/LDAvis", ref = "new")

In that version, createJSON has changed to newJSON, but it should change back to createJSON before we formally introduce these changes.

equihuam commented 10 years ago

Your first suggestion worked fine!!!!! well I did also upgraded R to 3.1.2. Will look into the createJSON now. Thank you very much.