
Add Figure Attributes
rtf_figure(
tbl,
page_width = 8.5,
page_height = 11,
orientation = "portrait",
doctype = "wma",
fig_width = 5,
fig_height = 5
)
A data frame
page width in inches
page height in inches
Orientation in 'portrait' or 'landscape'
doctype in 'csr', 'wma', or 'wmm'
the width of figures in inch
the height of figures in inch
the same data frame tbl
with additional attributes for figure body
# NOT RUN {
library(dplyr) # required to run examples
file <- file.path(tempdir(), "figure1.png")
png(file)
plot(1:10)
dev.off()
# Read in PNG file in binary format
rtf_read_png(file) %>% rtf_figure() %>%
attributes()
# }
Run the code above in your browser using DataLab