cpsievert / LDAvis

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

runVis() returns an error. #1

Closed kaneplusplus closed 10 years ago

kaneplusplus commented 10 years ago
> library(LDAvis)
Loading required package: shiny
Loading required package: MASS
Loading required package: proxy

Attaching package: ‘proxy’

The following objects are masked from ‘package:stats’:

    as.dist, dist

Loading required package: plyr
Loading required package: reshape2
> runVis()
Error in eval(expr, envir, enclos) : object 'topic.proportion' not found
kshirley commented 10 years ago

Hi Mike,

For now you need to have a few objects in your global R environment (including 'topic.proportion') in order for runVis() to work.

From the help file for runVis():

Example using Newsgroup documents from http://qwone.com/~jason/20Newsgroups/

data("Newsgroupdata", package = "LDAvis")

Run the check inputs function:

z <- check.inputs(K=50, W=22524, phi=Newsgroupdata$phi, token.frequency=Newsgroupdata$token.frequency, vocab=Newsgroupdata$vocab, topic.proportion=Newsgroupdata$topic.proportion) for (i in 1:length(z)) assign(names(z)[i], z[[i]])

Set a seed to ensure k-means produces the same clusters every time you runVis()

set.seed(333) runVis()