Running 'test_boot_one.R' [170s]
  Running 'test_boot_two.R' [12s]
  Running 'test_equiv_tost.R' [163s]
  Running 'test_plot_one_group.R' [176s]
  Running 'test_plot_two_groups.R' [168s]
Running the tests in 'tests/test_boot_one.R' failed.
Complete output:
  > library(ThermalSampleR)
  > library(testthat)
  > # run test_file("test_ThermalSampleR.R") to test everything in this R file
  > 
  > coreid = ThermalSampleR::coreid_data
  > 
  > ############################################################################################
  > # BOOT_ONE and PLOT_ONE_GROUP TESTS
  > ############################################################################################
  > 
  > ########################################
  > # Test for general errors: boot_one
  > ########################################
  > 
  > bt_one = boot_one(data=coreid, groups_col=col,
  +                   groups_which="Catorhintha schaffneri_APM",
  +                   n_max=49, iter=15, response=response)
  > 
  > testthat::test_that("No error is thrown in boot_one function", {
  + 
  +   # Call the function and check for errors
  +   testthat::expect_no_error(boot_one(data=coreid, groups_col=col,
  +                         groups_which="Catorhintha schaffneri_APM",
  +                         n_max=49, iter=15, response=response))
  + })
  Test passed 🥇
  > 
  > ##################################################
  > # Test: user puts in the incorrect groups_col
  > ##################################################
  > 
  > testthat::test_that("Error is thrown in boot_one function", {
  + 
  +   # Call the function and check for errors
  +   testthat::expect_error(boot_one(data=coreid, groups_col="Catorhintha schaffneri_APM",
  +                            groups_which="Catorhintha schaffneri_APM",
  +                            n_max=49, iter=15, response=response))
  + })
  Test passed 🥳
  > 
  > ########################################
  > # check that the col column consists of names
  > ########################################
  > 
  > testthat::test_that("Incorrect columns in data", {
  + 
  +   testthat::expect_type(coreid$col, "character")
  + })
  Test passed 🥳
  > 
  > ########################################
  > # check that the response column contains integers
  > ########################################
  > 
  > testthat::test_that("Incorrect columns in data", {
  + 
  +   testthat::expect_type(coreid$response, "integer")
  + })
  Test passed 🥳
  > 
  > ########################################
  > # Test for the class of bt_one output
  > ########################################
  > testthat::test_that("boot_one output is the list class", {
  + 
  +   testthat::expect_type(bt_one, "list")
  +   testthat::expect_type(bt_one$mean_low_ci[1], "double")
  +   testthat::expect_equal(ncol(bt_one), 14)
  + })
  Test passed 🥳
  > 
  > ########################################
  > # Test for NA values in bt_one
  > ########################################
  > 
  > # bt_one_buggy = bt_one
  > # bt_one_buggy$mean_low_ci[1] = NA
  > #
  > # testthat::test_that("No NA values in the dataframe", {
  > #   testthat::expect_false(any(is.na(bt_one)), info = "The dataframe contains NA values.")
  > # })
  > #
  > # testthat::test_that("NA values present in the dataframe", {
  > #   testthat::expect_true(any(is.na(bt_one_buggy)), info = "The dataframe does not contain NA values.")
  > # })
  > 
  > proc.time()
     user  system elapsed 
     9.28    0.43    9.75 
Running the tests in 'tests/test_equiv_tost.R' failed.
Complete output:
  > # library(ThermalSampleR)
  > # library(testthat)
  > # coreid = ThermalSampleR::coreid_data
  > #
  > # ############################################################################################
  > # # EQUIV_TOST TESTS
  > # ############################################################################################
  > #
  > # tte = equiv_tost(
  > #   # Which dataframe does the data come from?
  > #   data = coreid,
  > #   # Provide the column name containing the taxon ID
  > #   groups_col = col,
  > #   # Provide the name of the taxon to be tested
  > #   groups_which = "Catorhintha schaffneri_APM",
  > #   # Provide the name of the column containing the response variable (e.g CTmin data)
  > #   response = response,
  > #   # Define the skewness parameters
  > #   skews = c(1,10),
  > #   # Define the equivalence of subsets to full population CT estimate (unit = degree Celcius)
  > #   equiv_margin = 1,
  > #   # Size of the population to sample (will test subsamples of size pop_n - x against pop_n for equivalence). Defaults to population size = 30
  > #   pop_n = 5
  > # )
  > #
  > # ########################################
  > # # Test for the class of tte
  > # ########################################
  > # testthat::test_that("tte output is the ggplot class", {
  > #
  > #   testthat::expect_true(inherits(tte, "ggplot"))
  > # })
  > #
  > #
  > # testthat::test_that("No error is thrown in equiv_tost function", {
  > #
  > #   # Call the function and check for errors
  > #   testthat::expect_no_error(equiv_tost(
  > #     # Which dataframe does the data come from?
  > #     data = coreid,
  > #     # Provide the column name containing the taxon ID
  > #     groups_col = col,
  > #     # Provide the name of the taxon to be tested
  > #     groups_which = "Catorhintha schaffneri_APM",
  > #     # Provide the name of the column containing the response variable (e.g CTmin data)
  > #     response = response,
  > #     # Define the skewness parameters
  > #     skews = c(1,10),
  > #     # Define the equivalence of subsets to full population CT estimate (unit = degree Celcius)
  > #     equiv_margin = 1,
  > #     # Size of the population to sample (will test subsamples of size pop_n - x against pop_n for equivalence). Defaults to population size = 30
  > #     pop_n = 5
  > #   ))
  > # })
  > 
  > proc.time()
     user  system elapsed 
     0.23    0.01    0.21 
Running the tests in 'tests/test_plot_one_group.R' failed.
Complete output:
  > library(ThermalSampleR)
  > library(testthat)
  > coreid = ThermalSampleR::coreid_data
  > 
  > bt_one = boot_one(data=coreid, groups_col=col,
  +                   groups_which="Catorhintha schaffneri_APM",
  +                   n_max=49, iter=15, response=response)
  > 
  > #############################
  > # test bt_one plotting
  > #############################
  > 
  > plot_bt_one = plot_one_group(
  +   # Variable containing the output from running `boot_one` function
  +   x = bt_one,
  +   # Minimum sample size to plot
  +   n_min = 3,
  +   # Actual size of your existing dataset
  +   n_max = 15,
  +   # Colour for your experimental data
  +   colour_exp = "forestgreen",
  +   # Colour for the extrapolated predictions
  +   colour_extrap = "orange",
  +   # Position of the legend
  +   legend.position = "right",
  +   # Change the degree of shading on the graph
  +   alpha_val = 0.25)
  > 
  > ########################################
  > # Test for the class of plot_one_group
  > ########################################
  > testthat::test_that("plot_one_group output is the ggplot class", {
  + 
  +   testthat::expect_true(inherits(plot_bt_one, "ggplot"))
  + })
  Test passed 🥇
  > 
  > ##############################################
  > # Test for the correctness of user input file
  > ##############################################
  > 
  > testthat::test_that("Error: incorrect input data", {
  + 
  +   # Call the function and check for errors
  +   testthat::expect_error(plot_one_group(
  +     # Variable containing the output from running `boot_one` function
  +     x = bt_oneee, # incorrect name here -> should throw an error
  +     # Minimum sample size to plot
  +     n_min = 3,
  +     # Actual size of your existing dataset
  +     n_max = 15,
  +     # Colour for your experimental data
  +     colour_exp = "forestgreen",
  +     # Colour for the extrapolated predictions
  +     colour_extrap = "orange",
  +     # Position of the legend
  +     legend.position = "right",
  +     # Change the degree of shading on the graph
  +     alpha_val = 0.25))
  + })
  Test passed 🥳
  > 
  > proc.time()
     user  system elapsed 
     5.28    0.39    5.70 
Running the tests in 'tests/test_plot_two_groups.R' failed.
Complete output:
  > library(ThermalSampleR)
  > library(testthat)
  > coreid = ThermalSampleR::coreid_data
  > 
  > bt_two = boot_two(data=coreid, groups_col=col,
  +          group1="Catorhintha schaffneri_APM",
  +          group2="Catorhintha schaffneri_NPM",
  +          n_max=49, iter=15, response=response)
  > 
  > #############################
  > # test bt_two plotting
  > #############################
  > 
  > plot_bt_two = plot_two_groups(
  +   # Variable containing the output from running `boot_two` function
  +   x = bt_two,
  +   # Minimum sample size to plot
  +   n_min = 3,
  +   # Actual size of your existing dataset
  +   n_max = 30,
  +   # Colour for your experimental data
  +   colour_exp = "blue",
  +   # Colour for the extrapolated predictions
  +   colour_extrap = "red",
  +   # Position of the legend
  +   legend.position = "right",
  +   # Change the degree of shading on the graph
  +   alpha_val = 0.25)
  > 
  > ########################################
  > # Test for the class of plot_one_group
  > ########################################
  > testthat::test_that("plot_two_groups output is the ggplot class", {
  + 
  +   testthat::expect_true(inherits(plot_bt_two, "ggplot"))
  + })
  Test passed 🎊
  > 
  > proc.time()
     user  system elapsed 
     7.70    0.35    8.06