[R] Problems with na.rm=T
Lucke, Joseph F
Joseph.F.Lucke at uth.tmc.edu
Thu Jun 14 17:03:43 CEST 2007
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
More information about the R-help
mailing list