if(requireNamespace("magrittr") && interactive()) {
if (FALSE) {
# Error
g <- mtcars %>%
ggplot(aes(mpg, wt, colour = cyl)) +
geom_point() %>%
ggplot2loon()
}
g <- mtcars %>%
gg_pipe(
ggplot(aes(mpg, wt, colour = cyl)) + geom_point()
) %>%
ggplot2loon()
}
Run the code above in your browser using DataLab