tests/testthat/test_place_text.R

context("test place_text")

x <- range(press_ex[, 2])
y <- range(ind_ex[, 12], na.rm = TRUE)
x_prop <- 0.1
y_prop <- 0.1
pos <- "topleft"
dat <- place_text(x, y, x_prop, y_prop, pos = pos)

test_that("test_place_text", {
  expect_equal(round(dat$x, 5), 13.60461)
  expect_equal(round(dat$y, 6), 9.714304)
  expect_error(place_text(x, y, x_prop, y_prop, pos = "somewhere"))
})

Try the INDperform package in your browser

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

INDperform documentation built on Jan. 11, 2020, 9:08 a.m.