Since I answered your last question I have a bit more background. For some reason, the table you made doesn't seem to want to export with the method mentioned above.
However, you can export the table and save it as an image using the following code. First, the table gets saved as an htmlwidget. You can open the output .html
file that gets output and see the table if you wanted to. webshot
will then take a picture of the table and save it as an image.
library(htmlwidgets)
library(webshot)
test1 %>%
group_by(Name) %>%
summarise("Weekly_trend" = spk_chr(Total)) %>%
formattable() %>%
as.datatable(options = list(pageLength = 30)) %>%
spk_add_deps() -> w
htmlwidgets::saveWidget(w, "table.html", selfcontained = TRUE)
webshot::webshot(url = "table.html", file = "table.png",
vwidth = 1000, vheight = 275)