You could simply do
data %>%
group_by(foo) %>%
mutate(bars_by_foo = paste0(bar, collapse = ""))
Without any helper functions
More Related Contents:
- Summarizing multiple columns with dplyr? [duplicate]
- Relative frequencies / proportions with dplyr
- How to create a lag variable within each group?
- Why are my dplyr group_by & summarize not working properly? (name-collision with plyr)
- Unique rows, considering two columns, in R, without order
- standard evaluation in dplyr: summarise a variable given as a character string
- How to number/label data-table by group-number from group_by?
- dplyr summarise: Equivalent of “.drop=FALSE” to keep groups with zero length in output
- dplyr: “Error in n(): function should not be called directly”
- dplyr: inner_join with a partial string match
- Can dplyr summarise over several variables without listing each one? [duplicate]
- Change value of variable with dplyr
- sample rows of subgroups from dataframe with dplyr
- Assigning Dates to Fiscal Year
- filter function in dplyr errors: object ‘name’ not found
- Create a ranking variable with dplyr?
- How to pass dynamic column names in dplyr into custom function?
- Calculate group mean while excluding current observation using dplyr
- R – Group by variable and then assign a unique ID [duplicate]
- Emulate split() with dplyr group_by: return a list of data frames
- Sparklyr: how to center a Spark table based on column?
- R sum a variable by two groups [duplicate]
- Join two data frames in R based on closest timestamp
- Conditionally Count in dplyr
- data.table row-wise sum, mean, min, max like dplyr?
- Update/Replace Values in Dataframe with Tidyverse Join
- dplyr: put count occurrences into new variable [duplicate]
- Add row in each group using dplyr and add_row()
- How to replace certain values in a specific rows and columns with NA in R?
- Add margin row totals in dplyr chain