Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201894

Create a column that identifies if all conditions are met

$
0
0

I have a data frame with numeric values. I want to check, for each row if they meet a certain criteria, and create a new column which gives TRUE if all criteria are met. Example criteria are Current.eGFR is greater than or equal to 15, or less than 60 and Decline.12month is less than or equal to -4.

This is head() of data frame

     ID Current.eGFR Decline.12month Decline.24.month
1   13         18.0            -1.3             -8.9
2   19         17.6             1.5             -2.3
3 1063         20.1            -5.3            -10.4
4  700         28.0            -0.2             -2.7
5 1518         14.6           -14.7            -45.2
6  197         19.0           -13.0             -5.1

Viewing all articles
Browse latest Browse all 201894

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>