Re: [R] Problems with na.rm=T

From: Lucke, Joseph F <>
Date: Thu, 14 Jun 2007 10:03:43 -0500

Brilliant! Yesterday, I created a table called T. Dumb. Removing it solves the problem. Thanks.

-----Original Message-----
From: Duncan Murdoch [] Sent: Thursday, June 14, 2007 10:01 AM
To: Lucke, Joseph F
Subject: Re: [R] Problems with na.rm=T

On 6/14/2007 10:32 AM, Lucke, Joseph F wrote:
> Suddenly (e.g. yesterday) all my functions that have "na.rm=" as a
> parameter (e.g., mean(), sd(), range(), etc.) have been reporting
> warnings with "na.rm=T". The message is "Warning message: the
> condition has length > 1 and only the first element will be used in:
if (na.rm) x
> <- x[!] ". This has never happened before. I don't recall
> having done anything that might generate this message. How do I fix
> this?

I imagine you have created a variable T of length greater than 1. Use TRUE (which is a reserved word, so you can't create such a variable). Don't keep big workspaces full of stuff you don't know about, create a new empty one in each session.

Duncan Murdoch mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 14 Jun 2007 - 15:45:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 14 Jun 2007 - 16:31:56 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.