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

From: Lucke, Joseph F <Joseph.F.Lucke_at_uth.tmc.edu>
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 [mailto:murdoch_at_stats.uwo.ca] Sent: Thursday, June 14, 2007 10:01 AM
To: Lucke, Joseph F
Cc: r-help_at_stat.math.ethz.ch
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[!is.na(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



R-help_at_stat.math.ethz.ch 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. 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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.