[R] margin.table

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Jul 3 14:11:00 CEST 2001

Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> > is.array(mm)
> [1] FALSE
> and final line of margin.table tries to make the result make into a
> data frame.
> One could argue that as it accepted a non-array it should do a better job
> with it, but we need the author (who is away this week) to explain why
> he copied the class of the first argument to the result.

Because Kurt (who's also away this week) asked him to... It's to
preserve "xtabs" and "table" classes on the result. Data frames never
entered my mind and I don't think you should reasonably expect them to

   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