Quantcast
Channel: Convert multiple entries to a single row with a vector column in R - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by akrun for Convert multiple entries to a single row with a vector...

It may be better to keep it in a list instead of a single string after doing the grouping by 'Name'library(dplyr)old_way %>% group_by(Name) %>% summarise(Last_Day = last(Day), Avg_Purchase =...

View Article



Convert multiple entries to a single row with a vector column in R

I have a dataset with multiple rows that describes one user. I am trying to change my dataset to be one row represents one user.Reproducible Example:old_way <- data.frame("Day" = 1:10, "Purchase" =...

View Article
Browsing latest articles
Browse All 2 View Live


Latest Images