Tidyverse ggplot() help: How to segment each column in the geom_bar()

Thanks for giving reprex() a try. You’re almost there.

This error:
#> Error in UseMethod("filter_"): no applicable method for 'filter_' applied to an object of class "function"

is appearing (and causing the cascade of other errors) because you haven’t included code that creates your data in the chunk of code that you applied reprex() to, so R thinks data refers to a built-in R function by that name. reprex() runs in its own separate R session, so your code really does need to be self-contained — it can’t access objects in the session and environment that you called reprex() from.

The quickest path to a functional self-contained example here is to choose one of the methods in this thread to use to include code that creates a sample data object named data in your reprex()ed chunk.

1 Like