But it said there is unexpected symbol in "ret_df_1 <- mutate(ret_df_1, Date= ds_cls_1$Date) %>% select(Date, everything()) ret_df_1", I can't figure where's the unexpected symbol is.
Maybe ret_df_1 should be on its own line, it's just there after a closing bracket.
P.s. when posting code here if you use 3 backticks and r all together without stars it will format the code a bit nicer.