I’m trying to calculate the mean of a certain column after having used group_by to group my table by a certain category however when I use summarise(mean(column name)) some means come out as NA whereas I’m pretty sure there are no missing values in my dataset. (I’m using the built-in nycflights13 dataset).

@JackFrench, no so missing will not be handled as 0's. The calculation will take place with fever values. So lets say one column has 40 eligible values all 40 will be summed and divided by 40 whereas say you have one column with only 34 valid values only those 34 values will be summed and divided by 34 etc. So you will get the correct answer and not deflate your means.

I might have misworded my question but what I meant was, say if there’s a 0 in one of my columns, would that be considered as a missing value in the function you gave me? As in I would still want that 0 to be used to calculate the value of the mean