Eduardo Klein <eklein <at> usb.ve> writes:
> I would like to know how R assigns the numeric code to a set of factors > in a vector. [snip] > It is indeed alphabetical by default. To get it in order of appearance you could do something like set.seed(1001) x <- sample(letters[1:5],50,replace=TRUE) f <- factor(x,levels=unique(x)) ______________________________________________ [email protected] 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.

