[Rd] Proposal unary - operator for factors

William Dunlap wdunlap at tibco.com
Thu Feb 4 00:28:04 CET 2010

> -----Original Message-----
> From: r-devel-bounces at r-project.org 
> [mailto:r-devel-bounces at r-project.org] On Behalf Of Hadley Wickham
> Sent: Wednesday, February 03, 2010 3:10 PM
> To: r-devel at 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

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

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com 

> Hadley
> -- 
> http://had.co.nz/
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list