Continuing to beat the greasy spot in the road where the dead horse used to
be....

1) I know that the people building r are working on bigger and better things
than this silly question and I appreciate the existence of this complicated
package that was dropped in my lap for free.

2) Tony Platt succinctly pointed out one of the underlying 'problems'
(possibly in my understanding):


> #this is a perfectly reasonable r object
> some.weird.object<-factor(c("a","b","c"))
> #this is an internal r function acting on an object
> typeof(some.weird.object)
[1] "integer"
> #this is a primitive r function acting on an object
> is.numeric(some.weird.object)
[1] FALSE
>

Do these functions behave in a design consistent manor??  Can a single r
object simultaneously be of type integer and NOT numeric??  If this is
intentional can someone explain why?

I don't think this has anything to do with taking the median of a factor
(median calls mode that calls typeof).  It just requires a sufficiently
complex object, such as factor, before we start seeing this behavior.  I
wasn't clever enough to come up with examples of non-factor objects that
produced this behavior so I am curious if this problem is internal to factor
or to the functions themselves.

Thanks
Bob


-----Original Message-----
From: Duncan Murdoch [mailto:dmurdoch@pair.com] 
Sent: Sunday, November 02, 2003 9:40 AM
To: Peter Dalgaard
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Weird problem with median on a factor

On 02 Nov 2003 12:50:37 +0100, you wrote:

>(Arguably, sorting an unordered factor ought to Verboten as well,
>though!)

No, arbitrarily assigning an ordering and using that to sort is a
useful thing in many situations, e.g. searching.  

Duncan Murdoch

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

	[[alternative HTML version deleted]]


