tests/testthat/test-default-methods.R

test_that("test default textplot methods", {
    expect_error(
        textplot_keyness(TRUE),
        "textplot_keyness\\(\\) only works on keyness objects"
    )
    expect_error(
        textplot_wordcloud(TRUE),
        "textplot_wordcloud\\(\\) only works on dfm, keyness objects"
    )
    expect_error(
        textplot_xray(TRUE),
        "textplot_xray\\(\\) only works on kwic objects"
    )
    expect_error(
        textplot_scale1d(TRUE),
        "textplot_scale1d\\(\\) only works on predict.textmodel_wordscores, textmodel_ca, textmodel_wordfish, textmodel_wordscores objects"
    )
})

Try the quanteda.textplots package in your browser

Any scripts or data that you put into this service are public.

quanteda.textplots documentation built on June 22, 2024, 7:33 p.m.