You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Works, and used to be recommended, but now that group_by() is getting slowly superseded by the .by keyword, it seems we need a replacement for rowwise() as well.
My data happens to have an ID column, so I can get the same result (I checked) with:
All of this is a long-winded way of saying that row_number() seems to have a very useful interpretation as an argument to the .by parameter within a mutate() function.
The text was updated successfully, but these errors were encountered:
I want to calculate a scale and add it to my data frame. Here are three options that do work:
Works, and used to be recommended, but now that
group_by()
is getting slowly superseded by the.by
keyword, it seems we need a replacement forrowwise()
as well.My data happens to have an ID column, so I can get the same result (I checked) with:
If I did not have an ID column, I could have created one with:
But of course, I then want a fourth way to do this, which does not work:
All of this is a long-winded way of saying that
row_number()
seems to have a very useful interpretation as an argument to the.by
parameter within amutate()
function.The text was updated successfully, but these errors were encountered: