2

What is the best way to unit test (testthat R package) graphs produced using ggplot2?

I will be using fixed data so will be validating input table dt to ggplot2 using equal.

I am aware that:

  • unit tests need to be done in isolation
  • we need to validate that data is passed correctly to ggplot?
Karolis Koncevičius
  • 9,417
  • 9
  • 56
  • 89
Susan
  • 403
  • 6
  • 14
  • 6
    possible duplicate of [How to write a test for a ggplot plot](http://stackoverflow.com/questions/31038709/how-to-write-a-test-for-a-ggplot-plot) – tonytonov Jul 02 '15 at 08:46

0 Answers0