[R programming] CREATE_NEW a new dataframe, df_weather_daily, by…

Question Answered step-by-step [R programming] CREATE_NEW a new dataframe, df_weather_daily, by… [R programming]CREATE_NEW a new dataframe, df_weather_daily, by pivoting the dataframe  df_weather_weekly from wide to long such that names of the seven columns (Monday:Sunday) are in a new column day and the values from those seven columns (Monday:Sunday) are in a new column max_temp. Display the first 10 rows of df_weather_daily to verify that the pivot worked.  data CSV: https://www.dropbox.com/s/t3eyosn6sque3mb/max_temp.csv?dl=0 POSSIBLE Code: —>WITH ERROR, PLEASE HELP USE A NEW WAY TO ANSWERdf_weather_weekly<-read.csv("max_temp.csv") df_weather_daily <-df_weather_weekly %>%mutate(Date = case_when(  day ==’Monday’ ~ mdy(WeekStarting)+1 ,day ==’Tuesday’ ~ mdy(WeekStarting)+2 ,day ==’Wednesday’ ~ mdy(WeekStarting)+3 ,day ==’Thursday’ ~ mdy(WeekStarting)+4 ,day ==’Friday’ ~ mdy(WeekStarting)+5 ,day ==’Saturday’ ~ mdy(WeekStarting)+6 ,day ==’Sunday’ ~ mdy(WeekStarting)+0)) %>%  ungroup() ?????? Engineering & Technology Computer Science IDS 576 Share QuestionEmailCopy link Comments (0)