Group by concat in SparkR

156 Views Asked by At

I am trying to do something like group by concat in SparkR, but failed to do so.

In normal R, i am trying to do something like

library(dplyr)
df <- mtcars
df$text = row.names(mtcars)
result <- df %>% group_by(carb) %>% summarize(concat = paste(text, collapse = ','))

How could I implement this operation on a SparkDataFrame in SparkR?

Thanks in advance.

0

There are 0 best solutions below