Hi I have the below code for the purpose of adding a column called 'Area' with value 'Cambridge' for each row of a table. I'm then looking to select 3 columns and place the 'Area' column as the first column.
TableOutput <- TableOutput %>%
+ add_column(Area = "Cambridge") %>%
+ select(Area, age, rollingRate) %>%
+ relocate(Area, .before = age)
I get the below error, can anyone advise please? Thank you.
Error in is.data.frame(.data) : argument ".data" is missing, with no default