search for: one_absence

Displaying 1 result from an estimated 1 matches for "one_absence".

2011 Jan 27
2
identifying when one element of a row has a positive number
...n that tells one only one of the three variables for a given row has a value of 0. For my example the new columns would be: one_presence<-c("ANN","CTA","GLM","NA","ANN","NA","NA","NA","NA","CTA") one_absence<-c("NA","NA","NA","NA","NA","NA","GLM","CTA","NA","NA") The end result should look like df2<-(cbind(df1,one_presence,one_absence)) I am sure I can do this with a loop or maybe grep but I am...