[R] Error Message Documentation

Uwe Ligges ligges at statistik.uni-dortmund.de
Sun Sep 17 10:25:32 CEST 2006

cjkogan111 wrote:
> Hello,
> I am new to R, and trying to work with it. I have a couple of quick
> questions. First, I made a program and got the following error message.
> ------------------------------------------------------------------------------------------------------------------
> Error in if (DatMdFile$Time.Value[NmRecord] < VBinTimesMinTop[NmCounter]) {
> : 
>         missing value where TRUE/FALSE needed
> In addition: Warning message:
> < not meaningful for factors in: Ops.factor(DatMdFile$Time.Value[NmRecord],
> VBinTimesMinTop[NmCounter]) 
> -----------------------------------------------------------------------------------------------------------------
> I noticed that one of the values had decimal places, while the other didn't,
> so the comparison would be 11.00 > 10
> I don't know if that might have anything to do with my problem.

Well, not really the decimal places, but the data type.

> Anyway, I don't have much idea what the error means, and I don't know how to
> check what data type the different vectors are.

So time to start looking at the documentation?
class() is your friend, you might also want to try str().

> I was wondering if anyone could help me out, and also, I was wondering if
> there is any error documentation (stuff that tells what the error means.)

Probably one of your objects is a factor rather than a numeric value.

> Thanks!
> - cjkogan111


More information about the R-help mailing list