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

>From your description, it sounds like you confused row lables and vector
values -- two very different things.  It also sounds like you mixed up
factor values and levels.  Let me know if I'm wrong.

> 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)�.

What did you do to make R do this coersion?  I can't tell from here.

Try this, with the same "Subject" vector:

foo <- factor(Subject)
foo
levels(foo) <- names(Subject)
foo

Does that help?

Cheers

Jason

______________________________________________
[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