From pdalgd at gmail.com  Mon May 17 08:46:43 2010
From: pdalgd at gmail.com (Peter Dalgaard)
Date: Mon, 17 May 2010 08:46:43 +0200
Subject: [Rd] R CMD check
In-Reply-To: <E46813A8-1C3B-4310-93BA-D1B8A19E658F@gmail.com>
References: <E46813A8-1C3B-4310-93BA-D1B8A19E658F@gmail.com>
Message-ID: <4BF0E653.3000400@gmail.com>

sahil seth wrote:
> Hi,
> I have been finding clues on the internet to understand the reason for this warning.
> The package i have made, builds, installs and works well, except for this warning when I check it:
> 
> When I run:
> R CMD check mypack_1.0.tar.gz
> ... ... .. ..
> * checking R code for possible problems ... NOTE
> Found possibly global 'T' or 'F' in the following functions:
>   HWE procRef readMartFile readPhase2File
> .. ... .. 
> 
> 
> 
> I have several other functions in the package, but the warning is for this subset. 
> 
> I am trying to find a common thing within this subset, and cant figure out one to go after it.
> 
> Thanks a lot for the help.

Look for spots where you sloppily have used, say, na.rm=T instead of
na.rm=TRUE.

This kind of construction will break if something redefines T/F
globally, hence the warning. (The code checker heuristics first looks a
local definition of T or F, in which case things are fine, or at least
not wrong for this particular reason.)

-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



[Rd] R CMD check
Peter Dalgaard