Hello everyone,

First time posting and new to here and in R. I have query already ready I just need to run and calculate the top 10% from Excel data file.

I am getting error

Error: unexpected symbol in "transmute(Lane_State,`Sum(TOTAL_TOTAL)`

)USbound_Period_End_P12_2022"

below is my query

USbound_Period_End_P12_2022<-USbound_Period_End_P12_2022%>% filter(CORP_YR_NUM==2022) %>%

transmute(Lane_State,SERVICE_CD,CORP_WK_NUM,CORP_PD_NUM,`Sum(TOTAL_TOTAL)`

)

transmute(Lane_State,`Sum(TOTAL_TOTAL)`

)USbound_Period_End_P12_2022>%>

arrange(desc(`Sum(TOTAL_TOTAL)`

)) %>%

group_by(CORP_WK_NUM,Lane_State) %>%

slice(1:ceiling(0.10 * n())) %>%

can anyone help me for this?

Thanks

This message is almost always about punctuation. Try a `,`

after the second `)`

This is after a ,

USbound_Period_End_P12_2022<-USbound_Period_End_P12_2022%>% filter(CORP_YR_NUM==2022) %>%

transmute(Lane_State,SERVICE_CD,CORP_WK_NUM,CORP_PD_NUM,`Sum(TOTAL_TOTAL)`

)

transmute(Lane_State,`Sum(TOTAL_TOTAL)`

),USbound_Period_End_P12_2022>%>

arrange(desc(`Sum(TOTAL_TOTAL)`

)) %>%

group_by(CORP_WK_NUM,Lane_State) %>%

slice(1:ceiling(0.10 * n())) %>%

and still have error

Error: unexpected ',' in "transmute(Lane_State,`Sum(TOTAL_TOTAL)`

),"

```
USbound_Period_End_P12_2022>%>
arrange(desc(`Sum(TOTAL_TOTAL)`)) %>%
group_by(CORP_WK_NUM,Lane_State) %>%
slice(1:ceiling(0.10 * n())) %>%
````USbound_Period_End_P12_2022<-USbound_Period_End_P12_2022%>% filter(CORP_YR_NUM==2022) %>%
transmute(Lane_State,SERVICE_CD,CORP_WK_NUM,CORP_PD_NUM,`Sum(TOTAL_TOTAL)`)
transmute(Lane_State,`Sum(TOTAL_TOTAL)`)
```