Jim Beam Jim Beam - 6 months ago 19
R Question

R: Summary information only for positive numbers in a range

I have variable in a dataframe that contains values between -70 and 78. If I use the

function, I get a summary with all the numbers included (as expected).
Is it possible to run
ONLY on the positive numbers (>0) within that variable?


Yes, it's possible.

The code below works, assuming your data frame is called myData and the column you want to filter (to values >0) is called x.