wb <- wb_workbook() %>% wb_add_worksheet() %>% wb_add_data(x = mtcars)
df <- wb_data(wb)
wb <- wb %>%
wb_add_pivot_table(df, dims = "A3",
filter = "am", rows = "cyl", cols = "gear", data = "disp")
Run the code above in your browser using DataLab