stat_bin() can only have an x or y aesthetic

A typical histogram has a continuous variable on the x axis that has been divided into bins and on the y axis it has a count of the number of samples within each bin. Because of that, you should not need to supply data to the y axis and that is what ggplot is complaining about.

Do you want to draw separate histograms for different values of time?

Can you post a little of your data and explain more about what you want to plot? To show the data, you can post the output of

dput(head(dataSubset))

Please put a line containing only three back ticks, ```, just before and just after the function output.
```
Your copied output here.
```