79122368

Date: 2024-10-24 14:22:31
Score: 0.5
Natty:
Report link

A more general solution than the one from @r2evans is to use a anonymous function

myresults %>%
  mutate(dataset_name='datasets aggregated') %>%
  (\(.) bind_rows(., filter(., method=='c') %>% mutate(method_group = 'other')))() #NOTE : `()` at the end is optional for the `dplyr` pipe but compulsory with the base R pipe (|>) 
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @r2evans
Posted by: Julien