| toxlsx | R Documentation | 
export figure to pptx
toxlsx( figure = NULL, filename = NULL, width = 6, height = 6, devsize = FALSE, units = "in" )
| figure | plot figure function | 
| filename | output filename | 
| width | width of the output figure | 
| height | height of the output figure | 
| devsize | Boolean value show use device size or not (default = FALSE) | 
| units | the units in which to return the value – inches, cm, or pixels (device units) | 
Kai Guo
if(interactive()){
plot(mtcars$mpg, mtcars$disp)
toxlsx(filename = file.path(tempdir(), "mtcars.xlsx"))
## use ggplot2
ggplot(mtcars, aes(mpg, disp, color = factor(cyl))) + geom_point()
toxlsx(filename = file.path(tempdir(), "mtcars.xlsx"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.