Re: [Rd] Minimum of an ordered factor

2011-01-07 Thread Kurt Hornik
> Martin Maechler writes: > "TTLAM" == Thaler, Thorn, LAUSANNE, Applied Mathematics > > on Thu, 6 Jan 2011 15:37:01 +0100 writes: TTLAM> Kurt Hornik writes >>> >> if (!all(sapply(args, is.ordered)) || >>> >> !all(sapply(level.list, identical, y = level.set))) { >>> >>> I th

Re: [Rd] Minimum of an ordered factor

2011-01-07 Thread Martin Maechler
> Thaler,Thorn,LAUSANNE,Applied Mathematics > on Fri, 7 Jan 2011 13:35:16 +0100 writes: >> Martin Maechler writes >> I have now committed the amended proposal (rev 53925); >> thank you for the feedbacks.. > I had a look at it and there is a typo: > stop(g

Re: [Rd] Minimum of an ordered factor

2011-01-07 Thread Thaler, Thorn, LAUSANNE, Applied Mathematics
> Martin Maechler writes > I have now committed the amended proposal (rev 53925); > thank you for the feedbacks.. I had a look at it and there is a typo: stop(gettextf("'%s' not defined for \"difftime\" objects", .Generic), domain = NA) should rather be stop(gettextf("'%s' not defined f

Re: [Rd] Minimum of an ordered factor

2011-01-07 Thread Martin Maechler
> "TTLAM" == Thaler, Thorn, LAUSANNE, Applied Mathematics > > on Thu, 6 Jan 2011 15:37:01 +0100 writes: TTLAM> Kurt Hornik writes >> >> if (!all(sapply(args, is.ordered)) || >> >> !all(sapply(level.list, identical, y = level.set))) { >> >> I think it would be

Re: [Rd] Minimum of an ordered factor

2011-01-06 Thread Thaler, Thorn, LAUSANNE, Applied Mathematics
Kurt Hornik writes > >> if (!all(sapply(args, is.ordered)) || > >> !all(sapply(level.list, identical, y = level.set))) { > > I think it would be better to use something like > > ll <- lapply(args, levels) > > !all(sapply(ll, identical, ll[[1L]])) > > [using union() is not quite right] Yes

Re: [Rd] Minimum of an ordered factor

2011-01-06 Thread Kurt Hornik
> Martin Maechler writes: I have 3 comments: > Thaler, Thorn, LAUSANNE, Applied Mathematics > > on Wed, 5 Jan 2011 11:20:47 +0100 writes: >> Hi everybody, Is there a particular reason, why this code >> does not work as intended: >> z <- factor(LETTERS[1:3], ordered = TRUE)

Re: [Rd] Minimum of an ordered factor

2011-01-05 Thread Martin Maechler
> Thaler, Thorn, LAUSANNE, Applied Mathematics > > on Wed, 5 Jan 2011 11:20:47 +0100 writes: > Hi everybody, Is there a particular reason, why this code > does not work as intended: > z <- factor(LETTERS[1:3], ordered = TRUE) > u <- 4:6 > min(z[u > 4]) >