A data.frame: 6 Ć 3
Id ActivityDay Calories
<dbl> <chr> <int>
1 1503960366 4/12/2016 1985
2 1503960366 4/13/2016 1797
3 1503960366 4/14/2016 1776
4 1503960366 4/15/2016 1745
5 1503960366 4/16/2016 1863
6 1503960366 4/17/2016 1728
Above is a head() preview of the dataset, I am trying to convert column name ActivityDay into ActivityDate while converting all the column names into lower cases, following are my codes:
# calories
calories %>%
rename_with(calories, tolower) %>%
rename(activitydate=activityday)
Error: Can't rename columns that don't exist.
ā Column `ActivityDay` doesn't exist.
Please help point out where I did wrong with the codes, thank you!