tests/testthat/test_truncateData.R

###################### truncateData
context("truncateData")
x <- c(1000, 4000, -9, 100, 101)
xTruncated <- DepecheR:::truncateData(x,
    control = c(0, 100), lowQuantile = 0,
    highQuantile = 1
)
x[3] <- 1
test_that("truncateData expected output", {
    expect_equal(c(100, 100, 0, 100, 100), xTruncated)
})

Try the DepecheR package in your browser

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

DepecheR documentation built on Nov. 8, 2020, 5:44 p.m.