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
This is because the underlying class Count_Distinct expects it is given something to visit that is as long as there are rows in the data, which is enough of an assumption when we know n_distinct only manages symbols.
I'm not trying to push towards forbidding things, but it would be easier to name whatever expression that would go inside n_distinct in some mutate call before and only accept symbols in n_distinct.
Also n_distinct("mpg") seems like a time bomb, probably not what was expected from the SO question, making it an hard error at least gives a better clue that it's wrong ?