tests/testthat/test_addcoltopic.R

library(miRetrieve)
library(testthat)

df_topic <- df_test %>%
    add_col_topic(topic.name = "TopicTest")

colnames(df_topic)[7]

topic_in <- unique(df_topic$Topic)

test_that("Tests that topic columns are created", {
    expect_equal(colnames(df_topic)[7], "Topic")
    expect_equal(topic_in, "TopicTest")
})

Try the miRetrieve package in your browser

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

miRetrieve documentation built on Sept. 19, 2021, 1:06 a.m.