length(result) == 0
> result <- integer(0)
> result
integer(0)> length(result) == 0
[1] TRUE>
On Tue, Nov 9, 2010 at 9:55 PM, vioravis <vioravis at 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 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 check for integer(0)? something like is.na???
>
> Thank you.
>
> Ravishankar
>
>
>
>
>
>
> --
> View this message in context:
http://r.789695.n4.nabble.com/Which-value-not-present-tp3035455p3035455.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem that you are trying to solve?