tests/testthat/ggplot-loop.R

suppressPackageStartupMessages(library(ggplot2))
for (j in 1:2) {
  # ggplot2 has been loaded previously
  print(ggplot(data.frame(x = rnorm(30), y = runif(30)), aes(x, y)) + geom_point())
}

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.