tests/testthat/plot-par2.R

barplot(table(mtcars$mpg), main = "All")
# should capture all plots in this loop
for (numcyl in levels(as.factor(mtcars$cyl))) {
  barplot(table(mtcars$mpg[mtcars$cyl == numcyl]), main = paste("cyl = ", numcyl))
}
hadley/evaluate documentation built on May 19, 2024, 12:59 a.m.