| plot.CMDist | R Documentation |
Plots the CMD score for each document, sorted from lowest to highest
engagement, with one panel per concept. If x was produced with
sens_interval = TRUE, error bars show each document's sensitivity
interval.
## S3 method for class 'CMDist'
plot(x, concept = NULL, ...)
x |
CMDist object returned by |
concept |
Character vector of one or more concept names to plot
(default = |
... |
Arguments to be passed to methods |
Invisibly returns x
CMDist, print.CMDist
data(ft_wv_sample)
data(jfk_speech)
jfk_speech$sentence <- tolower(jfk_speech$sentence)
jfk_speech$sentence <- gsub("[[:punct:]]+", " ", jfk_speech$sentence)
dtm <- dtm_builder(jfk_speech, sentence, sentence_id)
out <- CMDist(dtm, cw = "space", wv = ft_wv_sample)
plot(out)
# with sensitivity intervals, plotting a single concept
out_sens <- CMDist(dtm, cw = "space", wv = ft_wv_sample,
sens_interval = TRUE, n_iters = 5)
plot(out_sens, concept = "space")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.