Ben Wittner <bwittner <at> jimmy.harvard.edu> writes: : Is there some fast (built-in?) way to get the OR of all the elements in a : logical vector? Here are two possibilities: max(x) == 1 sum(x) > 0 These use the fact that logicals used in arithmetic operations are converted such that TRUE becomes 1 and FALSE becomes 0.