I want to do a summary count by group. And I don't want the final results include the calculation of 'NA'. I used the codes like following:
Outcome <- df %>% group_by(Subject) %>% summarise(Outcome_Count = n(),na.rm=TRUE)
But it did not exclude NA
, instead it add a var na.rm
.
It looks like this:
What should I do now in order to get Outcome without last row? I still want the one for UNKNOWn. It means differently compared to the case with NA
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…