I'm not going to insert all the code, but I believe you can help me just by what I'll explain below.
I have a table like this:
output<-
      date       ABC   CDE   FGH   
   1 2021-06-30  4.00  1.00  6.00  
   2 2021-07-02  1.00   NA    NA   
How do I add a sum column in the last column like this?
 output<-
       date        ABC   CDE   FGH  SUM
    1 2021-06-30  4.00  1.00  6.00  11.00
    2 2021-07-02  1.00   NA    NA   1.00
Data
structure(list(date = structure(c(18808, 18810), class = "Date"), 
    ABC = c(4, 1), CDE = c(1, NA), FGH = c(6, NA)), row.names = c(NA, 
-2L), class = "data.frame")
