Jim Beam Jim Beam - 1 year ago 66
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download