ggplot(data = Flint %>% filter(Flint$Lead <=7), aes(y=Flint$Lead, group=Flint$Ward)) + geom_boxplot() + stat_boxplot()
I have an excel file which Im trying to ggplot. I have to remove all values above 7 from the ggplot as its considered an outlier. I have tried to use subset and filter but am receiving this error. Error: Aesthetics must be either length 1 or the same as the data (5): y, group Is there a way I can get the data for Flint$First_Draw to be all values below . Sample Output would be multiple box plots based on wards. An example would be Ward 1: Lead 5.0 6.3, Ward 2: Lead 3.6, Ward 3: 2.8. For Ward 1 Lead 7.8 wouldn't appear as it is an outlier and is above 7. Thanks in advance!