2014-01-19 170 views

回答

6

爲什麼不使用any

any(a > 100) 
# FALSE 

any(a > 50) 
# TRUE 

if (any(a > 50)) { 
    # do something ... 
} 

有關詳細信息,請參閱?any