I have a df that has imperfect data in a number of columns. I do not wish to delete those columns but rather set each value in all of those columns to NA so that I can still have them in the data frame. I am using dplyr and am aware that I could simply list every row and set as NA like:
df %>%
mutate( column1 = NA,
column2 = NA, ...
but I would like a cleaner way of grouping all the column together so that I can set that group equal to NA. I've tried c(1:2) = NA
(using the column indices) but that hasn't seemed to work. Any help would be appreciated. Thanks in advance.