Hi there,
I would like to change the variable names in my data set but I receive an error. i do not understand why I cannot change the names just because they have missing values.
MDAA <- rename(MDAA, Sex motives = motive, Cyber victimization = Cyber,
In-person Victimization = person)
Here is the error:
Error: Selections can't have missing values.
Backtrace:
- dplyr::rename(MDAA, SM = motive)
- dplyr:::rename.data.frame(MDAA, SM = motive)
- tidyselect::eval_rename(expr(c(...)), .data)
- tidyselect:::rename_impl(...)
- tidyselect:::eval_select_impl(...)
- tidyselect:::vars_select_eval(...)
- tidyselect:::loc_validate(pos, vars)
- tidyselect:::check_missing(pos)
I would appreciate it if you please help me out.
Best wishes,
Fatemeh