tests/testthat/test-check_input.R

context("check_input")

library(testthat)
data("peak_data")
x <- check_input(peak_data,reference = NULL,plot = TRUE,main = "TEST", xlab = "Samples",  ylab = "Peaks")

peak_data[["C2"]][["time"]][4] <- "5,6"
d <- peak_data

test_that("output is correct", {
    expect_equal(as.character(x[["sample"]][[78]]), "P41")
    expect_equal(x[["peaks"]][28], 117)
    expect_error(check_input(d,rt_col_name = "RT"), "RT is not a valid variable name. Data contains: time & area")
})

Try the GCalignR package in your browser

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

GCalignR documentation built on Aug. 26, 2020, 9:06 a.m.