Pass fail test by group

Hi, and welcome!

Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers. In this case, without the data to play with, it's hard to give more than general guidance.

Since all that's needed is the data, assuming you have a data frame dat

dput(dat)

and cut and paste the result.

Chaining this should work similarly to

dat %>% 
    filter(measurement.lte.16 == "pass") %>%
    group_by(serial) %>%
    summarize(sum(measurement.lte.16) -> serial.fails

This is, of course, not debugged, for want of data, but should get you started.