Martin Maechler
2002-Jun-17 16:31 UTC
logicals in data frames -- as.data.frame() should allow them
Currently, as.data.frame() , i.e., at least its "matrix" method, still coerces logicals to factors. I think this is not desired and not according to the changes to read.table() for R 1.4.0 which allow logicals. Does anybody see a reason against a change which would allow logical matrices to become data.frames with logical variables ? Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <>< -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ripley@stats.ox.ac.uk
2002-Jun-17 16:41 UTC
logicals in data frames -- as.data.frame() should allow them
On Mon, 17 Jun 2002, Martin Maechler wrote:> Currently, as.data.frame() , i.e., at least its "matrix" method, > still coerces logicals to factors. I think this is not desired > and not according to the changes to read.table() for R 1.4.0 > which allow logicals. > > Does anybody see a reason against a change which would allow > logical matrices to become data.frames with logical variables ?It's what S4 does: not changing as.data.frame.matrix was an oversight on my part. -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._