stat_apply function

Apply a function to x or y values