On Tue, Jun 16, 2009 at 03:14:01PM +0800, Mao Jianfeng wrote:
>
> > levels(d$population)<-c("YXPy01", "KMPy01", "YLPy01", "GSPy02", "BCPy01",
> "LJPy01", "GYPt01", "YLPd01", "CYPd01", "CYPd02", "CYPd03", "BXPd01",
> "NSPt01")
>

I'm not "at home" with factors myself, but maybe this will do the trick for
you:

d$population <- factor(d$population, levels=c("YXPy01", "KMPy01", "YLPy01", ..))

[just to avoid any confusion: you have to spell out all levels instead of using
'..'; R will not automagically guess them.]

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

Reply via email to