Using functions inside nested data frames with map

0 votes

I have a nested data frame with 14 groups, each group containing 3 variables in the data column. I want to eliminate observations with a unique "unhashed_id", as follows.

.x <- data_nest %>% pluck("data", 1) %>% group_by(unhashed_id) %>% filter(n()>1) %>% summarise(count=n()) %>% tally(count)
.x <- data_nest %>% pluck("data", 2) %>% group_by(unhashed_id) %>% filter(n()>1) %>% summarise(count=n()) %>% tally(count)

Rather than repeating this process 14 times, how do I use map to do this for all 14 groups?

May 24, 2021 in Others by eminac

edited Mar 4 9 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP