Count observations greater than a particular value

r

Solution

Try using logical test and then sum over the values meeting the condition

sum(output$V4 > 2000)

Problem

I have a dataset `output` in R with a the variables `V1`,`V2`,`V3`,`V4`. How can I get the number of observations in `V4` that area greater than 2000?

Original source

Related problems