Hello, According to ?as.logical:
"as.logical attempts to coerce its argument to be of logical type. For factors, this uses the levels (labels)."
However, > as.logical(factor(c("FALSE", "TRUE"))) [1] TRUE TRUE Shouldn't it be the same as: > as.logical(levels(factor(c("FALSE", "TRUE")))) [1] FALSE TRUE according to the documentation? Did I miss something here? > sessionInfo() R version 2.11.1 RC (2010-05-29 r52140) x86_64-apple-darwin9.8.0 locale: [1] C/UTF-8/C/C/C/C attached base packages: [1] stats graphics grDevices utils datasets methods base Thanks, Philippe -- ..............................................<°}))><........ ) ) ) ) ) ( ( ( ( ( Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( ( Numerical Ecology of Aquatic Systems ) ) ) ) ) Mons University, Belgium ( ( ( ( ( .............................................................. ______________________________________________ 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.