I have created the below function. What I would like to do is update a particular column (y) in a data frame (df), depending on the values in a vector. If the value in the vecto