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
It would be nice if gather had an all-inclusive default when only key and value arguments are provided. This seems like the most intuitive default to me as I don't think you'd ever want to gather
no columns into a key and value... This would mean that for df the following "smart default" would be equivalent to the current UI (gather all columns).
df %>% gather(x, y)
the select() philosophy
Would this be confusing? Does it go against select()?
Now I think this impacts the whole opposite to the select() paradigm. That is if ... is NULL it current selects nothing... but what is the use case for selecting nothing? There are definitely some use cases for selecting everything ( such as that within gather() ).
In the quest of making code more naturally reader friendly an empty selection giving everything is definitely a negative... so perhaps an alternative solution:
df %>% gather(x, y, all=TRUE)
df %>% gather_all_into(x, y)
df %>% gather_into(x, y) # think: spread_outof(x,y) to reverse?
but my favorite...
df %>% into(x, y) # opens the door to 'outfrom()` / `outof`
The text was updated successfully, but these errors were encountered:
example data
intention
gather all columns of df into x,y.
current UI
request
It would be nice if
gather
had an all-inclusive default when onlykey
andvalue
arguments are provided. This seems like the most intuitive default to me as I don't think you'd ever want to gatherno columns into a key and value... This would mean that for
df
the following "smart default" would be equivalent to the current UI (gather all columns).the
select()
philosophyWould this be confusing? Does it go against
select()
?Now I think this impacts the whole opposite to the
select()
paradigm. That is if...
isNULL
it current selects nothing... but what is the use case for selecting nothing? There are definitely some use cases for selecting everything ( such as that withingather()
).In the quest of making code more naturally reader friendly an empty selection giving everything is definitely a negative... so perhaps an alternative solution:
but my favorite...
The text was updated successfully, but these errors were encountered: