p.dalgaard@biostat.ku.dk
2003-Feb-28 16:03 UTC
[Rd] unique turns ordered into factor (PR#2591)
[reported originally by Christoffer Tornøe]> f <- ordered(month.name) > f[1] January February March April May June July [8] August September October November December 12 Levels: April < August < December < February < January < July < ... < September> unique(f)[1] January February March April May June July [8] August September October November December 12 Levels: April August December February January July June March ... September this causes trouble in the internals of panel.superpose if the groups argument is an ordered factor. In that case id <- (groups[subscripts] == vals[i]) gives off the warning Incompatible methods ("Ops.ordered", "Ops.factor") for "==" S-PLUS (6.0 at least) does not do this, so I assume the fix is to modify unique.default in the obvious way. [Still present in the development sources] -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
maechler@stat.math.ethz.ch
2003-Feb-28 16:14 UTC
[Rd] unique turns ordered into factor (PR#2591)
>>>>> "PD" == p dalgaard <p.dalgaard@biostat.ku.dk> >>>>> on Fri, 28 Feb 2003 15:58:02 +0100 (MET) writes:PD> [reported originally by Christoffer Tornøe] >> f <- ordered(month.name) >> f PD> [1] January February March April May June July PD> [8] August September October November December PD> 12 Levels: April < August < December < February < January < July < ... < September >> unique(f) PD> [1] January February March April May June July PD> [8] August September October November December PD> 12 Levels: April August December February January July June March ... September PD> this causes trouble in the internals of panel.superpose if the groups PD> argument is an ordered factor. In that case PD> id <- (groups[subscripts] == vals[i]) PD> gives off the warning PD> Incompatible methods ("Ops.ordered", "Ops.factor") for "==" PD> S-PLUS (6.0 at least) does not do this, so I assume the fix is to PD> modify unique.default in the obvious way. I think it's a clear bug (independently of other implementations ..) Maybe it would be a bit cleaner to write an unique.factor(). The current unique.default() stems from the pre-method time, i.e., when it was just unique(). PD> [Still present in the development sources] Martin
Possibly Parallel Threads
- nlmeODE package combining NLME with a differential equation solve r
- Level sets of factors are different (panel.superpose)
- Fitting compartmental model with nls and lsoda?
- Lattice: panel.superpose function does not pass subscripts and groups arguments (PR#2377)
- The best way of generating a good representation for an array with header?