Skip to content
Prev 359400 / 398502 Next

Warning message: Computation failed in `stat_bin()`: attempt to apply non-function

The x= in the above statement is wrong

ggplot(aes(friend_count), data=pf) + geom_histogram()
will work but it looks funny.


The more common way to write the command would likely be:
ggplot(pf, aes(friend_count)) + geom_histogram()


The tat_bin() message is  just a warning.
Your data set has ~ 99,000 rows of data and geom_histogram() 's default is 30 bins which is probably too few to for you to see what is happening.  Come to 

Change the default binwidth to something a bit more manageable or perhaps use geom_density() to look at the distribution.

John Kane
Kingston ON Canada
____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!