Re: [R] How to test if something doesn't exist

2013-05-22 Thread Doran, Harold
dnesday, May 22, 2013 2:09 PM To: r-help@r-project.org Subject: [R] How to test if something doesn't exist Couldn't exactly explain the subject, so here's the example: idx<-which(blah[,1]=="xyz") idx integer(0) How do I test that idx has a valid value (namely, > 0)? TiA,

Re: [R] How to test if something doesn't exist

2013-05-22 Thread arun
" if(any(blah=="xyz")) blah else as.numeric(factor(blah)) #[1] 1 2 3 4 5 A.K. ----- Original Message ----- From: Joseph Trubisz To: arun Cc: Sent: Wednesday, May 22, 2013 2:37 PM Subject: Re: [R] How to test if something doesn't exist OK...got it...thanks Joe On M

Re: [R] How to test if something doesn't exist

2013-05-22 Thread arun
- Original Message - From: Joseph Trubisz To: r-help@r-project.org Cc: Sent: Wednesday, May 22, 2013 2:08 PM Subject: [R] How to test if something doesn't exist Couldn't exactly explain the subject, so here's  the example: idx<-which(blah[,1]=="x

[R] How to test if something doesn't exist

2013-05-22 Thread Joseph Trubisz
Couldn't exactly explain the subject, so here's the example: idx<-which(blah[,1]=="xyz") idx integer(0) How do I test that idx has a valid value (namely, > 0)? TiA, Joe __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help