You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use distinct on a grouped data.frame and explicitly put the group columns in the distinct, then I get duplicated columns:
df<-data.frame( a= c(1,2,3), b=c(4,5,6), c=c(7,8,9))
df %>% group_by(a) %>% distinct(a,b)
# creates a data.frame with two 'a' columns
Since putting 'a' in the distinct is not necessary as the group_by already makes sure that every value in 'a' is unique, this problem is easily fixed on the user side.
The text was updated successfully, but these errors were encountered:
When I use distinct on a grouped data.frame and explicitly put the group columns in the distinct, then I get duplicated columns:
Since putting 'a' in the distinct is not necessary as the group_by already makes sure that every value in 'a' is unique, this problem is easily fixed on the user side.
The text was updated successfully, but these errors were encountered: