library(dplyr) # Creating a mock dataframe with increased amount of data (5 times) df <- data.frame( Date = rep(c("2023-07-01", "2023-07-02", "2023-07-03"), each = 15), Value = rep(c(10, 20, 30), each = 15) ) print(df) # Convert the 'Date' column to a proper date format if it's not already df$Date <- as.Date(df$Date) # Create a new dataframe with the daily sum of values new_df <- df %>% group_by(Date) %>% summarize(DailySum = sum(Value)) # Convert the tibble to a dataframe new_df <- as.data.frame(new_df) # View the dataframe print(new_df)