[R] Transforming matrix to data.frame: problems
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Mon Nov 12 10:56:04 CET 2001
Agustin Lobo <alobo at ija.csic.es> writes:
> According to the doc, the output
> of as.data.frame(parcelas.cobtot.conti)
> is the one of as.data.frame.table(parcelas.cobtot.conti)
> and, therefore, object "a" is as described by the doc.
> Now, then, the question becomes
> how can I get a data.frame with the same dimensions of
> parcelas.cobtot.conti ?
By overriding the method dispatch:
as.data.frame.matrix(parcelas.cobtot.conti)
or
as.data.frame(unclass(parcelas.cobtot.conti))
--
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