R, Excel, Function, Pivot Tables.
plot") plot1=ggplot(diamonds)+geom_bar(aes(x=clarity,fill=color)) print(plot1) insertPlot(diamond.wb,"my plot",startCol = 3,startRow =4, width = 16, height = 10, fileType = "png", units = "cm") saveWorkbook(diamond.wb, file = "F:/diamonds_summary.xlsx", overwrite = TRUE) The result is as follows: