How to write a test for a ggplot plot

前端 未结 3 1445
别那么骄傲
别那么骄傲 2020-12-29 19:19

I have a lot of functions that generate plots, typically with ggplot2. Right now, I\'m generating the plot and testing the underlying data. But I\'d like to know if there\'s

3条回答
  •  伪装坚强ぢ
    2020-12-29 19:56

    It's worth noting that the vdiffr package is designed for comparing plots. A nice feature is that it integrates with the testthat package -- it's actually used for testing in ggplot2 -- and it has an add-in for RStudio to help manage your testsuite.

提交回复
热议问题