ave
isn't the best option here. It will return a vector the same length as your inputs, while I'm guessing that you want to lump the results together into a more compact table.
If that's the case, try aggregate
or tapply
instead:
> aggregate(x ~ v, df, mean)
v x
1 0:0 107.66667
2 1:0 69.00000
3 2:0 59.66667
> tapply(df$x, df$v, mean)
0:0 1:0 2:0
107.66667 69.00000 59.66667