0

Much like this previous question, I am trying to create some histograms with ggplot2 and would like to add a "greater than X"-bin that includes all values greater than some value.

In this particular case, I am dealing with a set of bike trip data with trip durations that vary from very small (under a minute) to very, very large (hours to days). I have filter()ed the set to remove the truly extraneous rows, but I would still like to show some of the outliers on the plot.

I had already found the solution given there, the package ggoutlier, but it evidently requires the data be in a data.frame—I get an error message that "is.data.frame(x) is not TRUE". This is correct, x is a tibble—is there another solution that works with a tibble?

  • 3
    Could you please share some reproducible data and code you have tried? – Quinten Dec 14 '22 at 16:54
  • 2
    Welcome to SO! I would doubt that your issue is related to your dataset being a `tibble` as a tibble is still a dataframe and hence `is.data.frame` should give TRUE, check e.g. `is.data.frame(tibble(mtcars))`. Hence I would suggest to provide [a minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) including a snippet of your data and the code you have tried. – stefan Dec 14 '22 at 17:23

0 Answers0