r - Remove rows that match a value -


I'm trying to filter some data. I say that columns have a numeric value, if all the columns Should be equal to zero. Although I am about to perform several matches, with which such a

  match1 & lt; - Match (which ($ FATALITIES storms == 0), which ($ INJURIES Storm == 0)) match2 & lt; - Match (Joe (storm $ CROPDMG == 0), which (Storm $ CROPDMGEXP == 0)) match 3 & lt; - Match (which ($ PROPDMG Storm == 0), which ($ PROPDMGEXP Storm == 0)) matches 4 & Lt; Match (match 1, match 2) matchiff and lieutenant; - Match (Match 4, Match 3)  

But this clearly does not work since giving the last vector status ... Data looks something like this:

BGN_ DATE STATE EVTYPE Fatalities Injections PROPDMG PROPDMGEXP CROPDMG 1 4/18/1950 0:00:00 AL TORNADO 0 15 25.0 of 3 2 4/18/1950 0: 00: 00 El Torrena 0 0 0.0 0 3 2/20/1951 0:00:00 El Torrena 0 2 25.0 K 0 4 6/8/1951 0:00:00 El Torrena 0 2 0.0 K 5/11/15/1951 0:00:00 El Torrena 0 0 0 0 0 0 6 6 11/15/1951 0:00:00 El Torrena 1 6 2.5 K. 7 11/16/1951 0:00:00 El Torrena 0 1 2.5 K. Croppy MJX Latitude Longgit EOOD Rifand 1 3040 8812 1 2 3042 8755 2 3 3340 8742 3 4 3458 8626 4 5 3412 8642 5 6 3450 8748 6 7 3405 8631 7 I am interested in removing all entries have that injury that, Fatiliti, Cropeedimji, PROPDMG (All of them together) I have already filtered NA from the cases (). Thanks I

< P> Here are some ways to make an interactive and very intuitive:
  subset (hurricane, peaks! = 0 | FATALITIES! = 0 | CROPDMG! = 0 | PROPDMG! = 0)  

and a programmatic, therefore more flexible / scalable:

  field & lt; - c ('injuries', 'fatalities', 'cROPDMG', 'PROPDMG') & lt; - rowSums (storm) [farms]! = 0) & gt; 0 Storm [to,]  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -