relates to #1671
Apparently this bug is still here. Consider this adapted example from #1671:
test <- data.frame(id = rep(1:4, each = 3), grade = rep(c(NA, "a", NA, "b"), each = 3), stringsAsFactors = FALSE)
test %>%
group_by(id) %>%
dplyr::summarise(test = grade[1])
Results in:
id test
(int) (chr)
1 1
2 2 a
3 3 NA
4 4 b
Installing the latest dev version, as well as the suggested commit 9bae2aa, doesn't fix this issue.