library(magrittr) library(gt) library(ggplot2) library(htmltools) library(gtExtras) library(dplyr) df = read.csv('https://docs.google.com/spreadsheets/d/e/2PACX-1vQP0OK8q9x5XJa9T_DrOr2Hua_MRbW4WrdIRcZszYHtSodmMso5gFp3ieHp9nRjs2zGdnB9lwhpiBXp/pub?gid=388995206&single=true&output=csv') df$Date <- as.POSIXct(df$Date, format = "%d/%m/%Y") df <- df[format(df$Date, "%Y") >= "2023", ] #df$Date <- as.Date(df$Date) df <- df[df$Amount < 0, ] df$Amount = abs(df$Amount) df <- df %>% group_by(Date) %>% summarize(daily_total = sum(Amount)) daily=as.data.frame(df) write.csv(daily, file = "daily.dat", row.names = FALSE, col.names = FALSE) print(daily) #daily <- data.frame(Date = df$Date, Amount = df$daily_total) #head(daily,n=100) #print(paste(df$Date, df$daily_total)) #table <- gt(data) %>% #gt_theme_538() %>% # #tab_row_group(rows = match("Material", data$Plastic) & # match("Application", data$Plumbing), # label = paste0("Group A")) #tab_row_group(rows = match("Plastic", data$Material),label = paste0("Plastic")) %>% #row_group_order(groups=c("Copper","Plastic")) %>% #tab_header(title = gt::html("

Test

")) %>% #tab_style(style = list(cell_fill(color = "#FFCC00")),locations = cells_row_groups()) #gtsave(table, file = "test.html") #system("wkhtmltopdf -O landscape toc *.html output3.pdf")