R-beta: S compatibility

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Fri Aug 14 16:02:32 CEST 1998


Martin Maechler <maechler at stat.math.ethz.ch> writes:

>     Jim> 1. replicating a factor does not give a factor:
>     Jim>	is.factor(rep(gl(2,1,2),2)) is FALSE
> 
> This *is* S-plus compatible!
> [Try  rep(factor(1:3), 2) ]

Wrong...You've become too used to seeing R print the factor levels:

> rep(factor(1:3), 2) 
[1] 1 2 3 1 2 3
> dput(rep(factor(1:3), 2))
structure(.Data = c(1, 2, 3, 1, 2, 3), .Label = c("1", "2", "3"),
class = "factor")


>     Jim> 4. glm()$contrast is very different from S - apparently the latter is
>     Jim> a list with one member per variable instead of a copy of the options
>     Jim> in effect
> The next (0.63) version of R will have the same as S, here (I think).
> 
> WARNING: The current snapshot of 0.63 is currently somewhat ``more unstable''
> 	than usual.

This got into 0.62.3 already, I think:

> glm.D93$contrasts
 
$outcome
[1] "contr.treatment"

$treatment
[1] "contr.treatment"



-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list