Learn R Programming

rvg (version 0.0.9)

write_xlsx: Microsoft Excel Graphics Device

Description

A graphical device for Microsoft Excel documents.

Usage

write_xlsx(file, code, size = c(width = 10, height = 7.5), ...)

Arguments

file
filename of the Microsoft Excel document to produce. File extension must be .xlsx.
code
Plotting code to execute
size
slide size in inches.
...
arguments for fun (passed on to dml_xlsx.)

Examples

Run this code
write_xlsx(file = "my_plot_1.xlsx", code = plot(rnorm(10)))
write_xlsx(file = "my_plot_2.xlsx", code = barplot(1:7, col = 1:7))

Run the code above in your browser using DataLab