tests/testthat/test-explore.R

context("Explore data (rtry_explore)")


test_that("basic test", {
  TRYdata_explore <- rtry_explore(data_TRY_15160, DataID, DataName)

  expect_equal(class(TRYdata_explore), c("tbl_df", "tbl", "data.frame"))
  expect_equal(ncol(TRYdata_explore), 3)
  expect_equal(colnames(TRYdata_explore), c("DataID", "DataName", "Count"))
})


test_that("rtry_explore handles one or more empty arguments", {
  message = "Please specify the input data and/or attribute names you would like to group together."

  expect_message(rtry_explore(), message)
  expect_message(rtry_explore(input = input), message())
})

Try the rtry package in your browser

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

rtry documentation built on Aug. 10, 2023, 1:07 a.m.