Yes Hmisc was loaded. Thanks for the insight. I usually pay
attention to which objects get "masked" ... but reorder was not in
that list. Anyway thanks.
Darin
On Tue, Oct 05, 2010 at 03:50:35PM -0700, Phil Spector wrote:
> Is it possible that the original poster had the Hmisc package loaded?
>
>>
Is it possible that the original poster had the
Hmisc package loaded?
Hmisc::reorder.factor
function (x, v, FUN = mean, ...)
ordered(x, levels(x)[order(tapply(v, x, FUN, ...))])
Without that package, reorder.default gets called:
getAnywhere('reorder.default')
A single object matching ‘reo
> sessionInfo()
R version 2.11.1 (2010-05-31)
i486-pc-linux-gnu
> x <- factor(1:5)
> x.ro <- reorder(x, rnorm(5))
> is.ordered(x.ro)
[1] FALSE
> x.ro <- reorder(x, rnorm(5), ordered=FALSE)
> is.ordered(x.ro)
[1] FALSE
On Tue, Oct 5, 2010 at 3:14 PM, Darin A. England wrote:
>
> Or at least is se
On Oct 5, 2010, at 6:14 PM, Darin A. England wrote:
Or at least is seems that way to me. It's not a big problem, but the
behavior doesn't match the documentation. (I think r-help is the
place to report this. )
x <- factor(1:5)
is.ordered(x.ro) # should be FALSE according to ?reorder
[1] TRU
y, 6 October 2010 8:15 AM
To: R Help
Subject: [R] reorder always returns "ordered"
Or at least is seems that way to me. It's not a big problem, but the
behavior doesn't match the documentation. (I think r-help is the
place to report this. )
> x <- factor(1:5)
> x
Or at least is seems that way to me. It's not a big problem, but the
behavior doesn't match the documentation. (I think r-help is the
place to report this. )
> x <- factor(1:5)
> x.ro <- reorder(x, rnorm(5))
> is.ordered(x.ro) # should be FALSE according to ?reorder
[1] TRUE
>
> x.ro <- reorder(
6 matches
Mail list logo