I have what I thought was an easy question but turns out to be quite tricky.... I am trying to pivot a df from wide to long, adding column totals before pivoting. The df contains text and data however and this seems to make it problematic? Also, the real df (not the example Dput below) has a quite large number of columns and rows so ideally I would prefer not to do each individually. Please see below for what I am attempting:
structure(list(Name = c("John", "Marco", "Tony"), Date = c("23/04/2020",
"23/04/2020", "23/04/2020"), Col1 = c(27, 30, 56), Col2 = c(26, 25, 45), Col3 = c("red", "blue","green")), row.names = c(NA,
-3L), class = c("tbl_df", "tbl", "data.frame"))