Closed nszekeres closed 2 years ago
@nszekeres: right now, you are trying to define the function within the dplyr chain. While there are ways to do that, you don't need to here. Instead, in sequence:
fix_missing()
x1ses
to NA
using your function fix_missing()
You can chain (2) and (3) together. So that your changes persist, you should assign the output to an object (like df
). Also, you don't need to select()
in order to mutate()
the missing values to NA
. Take another look at the first practical example in lesson 9.
Closing since it's older.
Hi, Dr. Skinner - I see I'm not getting this. :( When I see the functions, I'm not understanding how to apply the function to a particular domain -- data frame, column, etc. Like, in Q2: The point is to use an existing fuction. Are we supposed to pipe in the data and select out the variable so R knows to what variable apply the function toward?
I tried this:
And I got this error message:
Thanks, Naomi