Error in UseMethod("mutate_") : no applicable method for 'mutate_' applied to an object of class "function"

Hi @adam2, welcome to RStudio Community.

Your code looks fine. I suspect you have a package conflict that has masked the select() function from dplyr. Try replacing select() with dplyr::select() and see if that works?

By the way, if this is a homework assignment, please read our homework policy: