R4DS error comparison (1) is possible only for atomic and list types

The filter() function comes from the dplyr package. Be sure you’ve loaded it before running those lines. Otherwise, you’re running a comparison with class(), the built-in function, rather than mpg$class.

Leave a Comment

tech