View source: R/plot_specificities.R
plot_specificities | R Documentation |
Plot specificities of cat1 (lemma or word) according to cat2 (categories)
plot_specificities(df_spec, cat1, cat2)
df_spec |
a tibble with specifictities of cat1 according to cat2 |
cat1 |
words or lemmas |
cat2 |
categories |
a plot
mydf=dplyr::bind_rows(tibble::tibble(txt=janeaustenr::prideprejudice,
novel="Pride and Prejudice"),
tibble::tibble(txt=janeaustenr::sensesensibility,
novel="Sense and Sensibility")) %>%
tidytext::unnest_tokens(word,txt)
df_spec <- tidy_specificities(mydf,
cat1=word,
cat2=novel,
min_spec=5)
plot_specificities(df_spec,
cat1=word,
cat2=novel)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.