tests/testthat/test-rmse.R

test_that('rmse', {
    f <- 1:10 + 0.2
    r <- 1:10

    expect_equal(rmse(f, r), 0.2)
    expect_error(rmse(1:10, 1:9))
    expect_error(rmse(1, 2))
    expect_error(rmse(c(1:5, NA), 1:6))
})

Try the lfl package in your browser

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

lfl documentation built on Sept. 8, 2022, 5:08 p.m.