Recently I'm using aggregate function (stats package) and I noticed that it produces different results by different syntax I use.
Two type of syntax I used are:
aggregate(x~y, data, fun)
aggregate(data[...], by=list(...), fun)
Is it possible that aggregate function produces different results? Or different syntax could produce same results?
For the first type of syntax I noticed that produce different result when I use cbind to define variables to aggregate.