sum(Var >= 1000) will do this while Var is a vector. If not, you need to specify R to find Var inside any object containing it. Here is an example:
> set.seed(2) > Var <- sample(900:1100, 10) > Var [1] 937 1040 1014 933 1085 1084 925 1061 990 1005 > Var >= 1000 [1] FALSE TRUE TRUE FALSE TRUE TRUE FALSE TRUE FALSE TRUE > sum(Var >= 1000) [1] 6
This exploits the fact that TRUE = 1 and FALSE = 0.
Gavin simpson
source share