Wondering how to get this to work? I am trying to get the mean of number of gears for cars with less than 8 cylinders.
library(reprex) library(tidyverse) data("mtcars") x <- mtcars %>% filter(cyl < 8) %>% count(gear) list(x) %>% mean() #> Warning in mean.default(.): argument is not numeric or logical: returning NA #>  NA
Created on 2020-03-18 by the reprex package (v0.3.0)