library(officer)
dat <- data.frame(
stage = c("Visitors", "Leads", "Opportunities", "Quotes", "Customers"),
count = c(5000, 4000, 3000, 1000, 250),
stringsAsFactors = FALSE
)
fn <- ms_funnelchart(data = dat, x = "stage", y = "count")
doc <- read_pptx()
doc <- add_slide(doc)
doc <- ph_with(doc, fn, location = ph_location_fullsize())
print(doc, target = tempfile(fileext = ".pptx"))
Run the code above in your browser using DataLab