The filtering is placed first because @M_AcostaCH is using the pipe |>. The pipe sends the thing on its left as the first argument of the function on its right. That leads to code you can read from left to right. You can get the same plot with
To understand that, you read from the inside out; the penguins data set is nested inside two functions, filter() and ggplot().
Using the pipe is easier to read, I think, but it's just a matter of preference.
Remember that it is not a bad thing to ask and there is no such thing as a dumb question, there is always something new to learn, even the most expert in any subject has something to learn.
In this example, the pipe|> symbols can be understood as follows:
With the script what I am trying to say is, take the database penguins then apply a filter a in the bill_length_mm columns where you select the values greater than or equal to 45 and then make the graph.