search for: sortsth

Displaying 1 result from an estimated 1 matches for "sortsth".

Did you mean: sortsthe
2007 Dec 16
2
question about the aggregate function with respect to order of levels of grouping elements
...r" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec" agg2=aggregate(df[,2],list(year=years(df[,1]),month=fmonth),sum) levels(agg2$month) # even if a factor with levels in the correct order is supplied, aggregate(), sortsthe levels by alphabet regardless. [1] "Apr" "Aug" "Dec" "Feb" "Jan" "Jul" "Jun" "Mar" "May" "Nov" "Oct" "Sep" -- Tom [[alternative HTML version deleted]]