Problem: I want to mutate a new column (top_100k) that specifies values of 1 when rank == 1:100000. However, I am not sure how to expand the case_when() function in this way and if this is indeed appropriate.
Thank you very much! This is perfect. With the ", TRUE ~0" bit, would you know how to explain the TRUE argument? I would expect that this might be FALSE ~ 0 if we are allocating 0s to all values that do not match.