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))
}

Try the evaluate package in your browser

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

evaluate documentation built on Nov. 2, 2023, 5:18 p.m.