Trying to read in a number of CSV files and then summarise up to a useful level, but the issue is that some of the dates are YYYYMMDD (character) and others are DD-MM-YYYY (date) so the summarise function summarises these separately. I've tried the mutate function (my code is below) but it results in `no applicable method for 'mutate_' applied to an object of class "list"`.

I've also played around with the map function in purrr but I'm not familiar with it and can't get that to work either.

```
sales_files <- list.files(path = "*folder redacted*", full.names = TRUE) %>%
  lapply(read_csv) %>% 
  mutate(date = case_when(left(date,4) == "2020" ~ as.Date(as.character(date),format="%Y%m%d"), TRUE ~ date))
  group_by(`ID`, `Date`) %>% 
  summarise(sales = sum(`Value`), quantity = sum(`Qty`)) %>% 
  bind_rows

```

TIA!