David Winsemius wrote: > >> > > What about changing it to behave thusly: > > > as.logical.factor <- function(vec) > as.logical(as.numeric(factor(vec))-1 ) > > > as.logical(as.numeric(factor(c("TRUE", "FALSE", NA)))-1 ) > [1] TRUE FALSE NA > > as.logical(as.numeric(factor(c(TRUE, FALSE, NA)))-1 ) > [1] TRUE FALSE NA > >
No way: Think factor(dead, levels=c(1, 2), labels=c("TRUE", "FALSE")) (People are not _that_ unlikely do that. E.g., the tradition in epidemiology is to label tables with +/- in that order.) Anyways, Brian points out (privately) that it used to work as documented prior to v.2.6.0, so there's not likely to be that much of a problem with reinstating that behaviour. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Phone: (+45)38153501 Email: pd....@cbs.dk Priv: pda...@gmail.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.