I have a table that consists of only columns of type Date. The data is about shopping behavior of customers on a website. The columns correspond to the first time an event is triggered by a customer (NULL if no occurrence of the event). One of the columns is the purchase motion.
I want to update the table so that all the for a particular row, all the cells that do did not happen 7 days prior to the purchase are replaced with NULL. I'm looking for some guidance in coding this single line. I've tried utilizing mutate_all() to no avail.