rtist [quote]引用第3楼惊鸿于2007-09-04 23:45发表的“”: 能不能用控制语句得到,我用if 用些问题没解决[/quote] You can use ifelse, but NOT recommended. read ?ifelse and the indexing section in R-intro; and COS R FAQ's by Yihui and bjt.