[R] Which - value not present

2010-11-09 Thread vioravis
I am trying to use which function to obtain the index of a value in a dataframe. Depending on whether the value is present in the dataframe or not I am performing further operations to the dataframe. However, if the value is not present in the dataframe, I am getting an integer(0). How do I

Re: [R] Which - value not present

2010-11-09 Thread jim holtman
length(result) == 0 result - integer(0) result integer(0) length(result) == 0 [1] TRUE On Tue, Nov 9, 2010 at 9:55 PM, vioravis viora...@gmail.com wrote: I am trying to use which function to obtain the index of a value in a dataframe. Depending on whether the value is present in the

Re: [R] Which - value not present

2010-11-09 Thread vioravis
Thank you. It works fine. -- View this message in context: http://r.789695.n4.nabble.com/Which-value-not-present-tp3035455p3035575.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list