Yesterday I was biten by a feature, which I find too dangerous.

I wanted to use a factor `Subject� as index into a data frame, whose row
names were the levels of this factor. So there a 2 different possible
interpretations of this: Either Subject is coerced to numeric or to
character. The intended interpretation was, of course, `as.character(Subject)'.
R did `as.numeric(Subject)�. This will not cause a semantic error, when
the levels of Subject happen to be in numeric order; so it will be
unnoticed quite often.

I propose to issue a warning whenever a factor is implicitly coerced,
at least in an ambiguous context.

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to