tests/testthat/test_getcor.R

library(episcan)

context("test getcor")

test_that('pearson correlation',{
  a <- matrix(rnorm(40), nrow = 10)
  b <- matrix(rnorm(60), nrow = 10)
  expect_equal(getcor(a, b),
               cor(a, b))
})

Try the episcan package in your browser

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

episcan documentation built on May 2, 2019, 9:42 a.m.