> -----Original Message----- > From: r-devel-boun...@r-project.org > [mailto:r-devel-boun...@r-project.org] On Behalf Of Hadley Wickham > Sent: Wednesday, February 03, 2010 3:10 PM > To: r-devel@r-project.org > Subject: [Rd] Proposal unary - operator for factors > > Hi all, > > Why not make the unary minus operator return the factor with levels > reversed? This would make it much easier to sort factors in > descending order in part of an order statement.
It wouldn't make sense in the context of vector[-factor] Wouldn't it be better to allow order's decreasing argument to be a vector with one element per ... argument? That would work for numbers, factors, dates, and anything else. Currently order silently ignores decreasing[2] and beyond. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > > Hadley > > -- > http://had.co.nz/ > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel