So, if one wishes to apply an operation row by row in dplyr, one can use the rowwise function, for example: Applying a function to every row of a table using dp
rowwise
Just use ungroup()
ungroup()
The following produces a warning:
data.frame(a=1:4) %>% rowwise() %>% group_by(a) #Warning message: #Grouping rowwise data frame strips rowwise nature
This does not produce the warning:
data.frame(a=1:4) %>% rowwise() %>% ungroup() %>% group_by(a)