if (interactive()) {
# Can be chained with webshot() or appshot()
webshot("http://www.google.com/", "google-small-1.png") %>%
resize("75%")
# Generate image that is 400 pixels wide
webshot("http://www.google.com/", "google-small-2.png") %>%
resize("400x")
}
Run the code above in your browser using DataLab