[R] (no subject)

Duncan Murdoch dmurdoch at pair.com
Mon Jun 2 14:07:37 CEST 2003


On Mon, 02 Jun 2003 12:34:47 +0200, you wrote:

>"Error in var(x, na.rm = na.rm) : missing observations in cov/cor"
>
>Somebody would give me any clue about the origin of this error?
>There is any probability  that the origin of the problem is  the scarcitie
>of resources?
>(  I don´t understand how is possible a programming error).

This is unlikely to be due to a scarcity of resources; that should
give a different error message.

What the message says is that at some point you (or a function you
call) are calling the var() function and passing it NA values where it
doesn't want them.  You can use the traceback() function after the
error to see where the call occurs. 

If the NA values should be removed, then you need to make sure that
na.rm = TRUE when this call occurs.  If the NA values shouldn't be
there, then you need to find why they are, and fix your code.

Duncan Murdoch




More information about the R-help mailing list