count = n() statement
Hello, I'd like to ask what is the purpose of count= n() statement in that(time: 1.23) filtering operation? Thank you from now.
thanks for reaching out! The n() returns the number of observations we have in the group. So, when we say
count= n() we are asking for the number of observations in each group. As we're grouping by species, the second column count shows us the number of observations in the data which belong to the group. At the end of the statement we also add a condition for count > 1, so we only see the species, which have at least two members.
Hope this helps!