tests/testthat/test-ggTag.R

context("Check that the framework is correctly generated")

library(ggplot2)
library(grid)

testGraph <- qplot(Day, Wind, data = airquality, geom = "line", 
                   colour = factor(Month), main = "Wind vs Day")

test_that("Can create an image", {
  expect_silent(ggTag(testGraph))
})



library(png)
png_loc <- system.file(package = "ggTag", "extdata/r_logo.png")
a_png <- readPNG(png_loc)

pharmaTag(object = a_png, 
          protocol = "ABC123456",
          population = "Intent-to-treat")

test_that("Can create an image from png", {
  expect_silent(ggTag(testGraph))
})
andyofsmeg/ggTag documentation built on July 8, 2019, 5:45 a.m.