library(parsetidy) library(dplyr) library(ggplot2) x <- 1 y <- 3:8 code <- " z <- x + y + other d <- z + 2 print(d + 3) ggplot(mtcars, aes(wt, mpg)) + geom_point() mtcars %>% mutate(wt = wt + 1) %>% group_by(cyl, am) %>% summarise(mean(am)) " cat(reprex_prefix(code), sep = "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.