tests/testthat/test-multivariate.R

context("multivariate")

test_that("correctly calculates multivariate", {
  set.seed(123)
  data <- segments_1to5_6to10_11to15(1000)

  points <- r_multivariate(data)
  expect_equal(points, -4121.265, tolerance = 0.1)

  points <- multivariate(data)
  expect_equal(points, -4121.265, tolerance = 0.1)
})

Try the segmentr package in your browser

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

segmentr documentation built on Aug. 29, 2019, 1:03 a.m.