[R] by & tapply

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Wed Aug 30 11:43:49 CEST 2000


Peter Malewski <y0004379 at tu-bs.de> writes:

> 
> xn <- codes(x1)
> coplot(y~xn|x2)
> 
> ##or you use a loop:
> 
> par(mfrow=c(2,2))
> for( i in unique(codes(x1))) plot.default(x2 [codes(x1)== i]
>                                           , y[codes(x1)==i ]
>                                           ,main=paste("Code:",i)
>                                           )

Eek. Please use as.integer(), not codes(), for this stuff. (help(codes)
for the explanation).

-- 
   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