This is simple question, I guess. when using group_by()
from dplyr on several variables, can I use colon instead of comma to group variables?
Imagine I have V1 to V10 variables, and I want to group according to the first five. Do I need to:
group_by(V1, V2, V3, V4, V5)
Or can I:
group_by(V1:V5)
It seems I cannot, but is there any other alternative?
Thanks a lot.
Best,
David