Hey everyone, beginner to R. Quick question: why doesn't my code below work? I've noticed that just in general, whenever I use count() inside of summarize for anything, it never works, but other aggregate functions like sum, max, min, etc., tend to work. What is going on?
The problem here is that count() takes a table as input, whereas gender here represents the vector contained in the column gender. From the documentation for count()`, which you can find by running