From therneau at mayo.edu  Fri Apr 16 16:16:02 2010
From: therneau at mayo.edu (Therneau, Terry M., Ph.D.)
Date: Fri, 16 Apr 2010 09:16:02 -0500
Subject: [Rd] R CMD check tells me 'no visible binding for
	globalvariable'
In-Reply-To: <mailman.27.1271412010.6962.r-devel@r-project.org>
References: <mailman.27.1271412010.6962.r-devel@r-project.org>
Message-ID: <5DBE21404FF5E54C826BE1040C2CD031C918EE@msgebe52.mfad.mfroot.org>

Henrik wrote: 

I think what people are also thinking about is that the policy for
publishing a package on CRAN is that it have to pass R CMD check with
no errors, warnings *or* notes.  So, in that sense notes are no
different from warnings.
---------------------------------

Getting rid of these notes would be very hard in the survival package.
The population survival routines (survexp, pyears) that have to deal
with dates try to be very accommodating wrt the date format the user
chose, so have constructions like
   if (user date looks like a chron object) {
         calculation using chron functions
         }
   else if (is from the date package) {
        use mdy.date }
   else if (Date object)

etc

   Most of the functions inside the {} cause a warning note because of
course the necessary packages for each case are not present when
survival is built.  Since we deal with medical studies that span
multiple years or even decades, I and others in my group benefit
directly from this date handling: it was not added solely from a
humanitarian impulse.
   
  It's a minor nuisance, since I have to read through the messages after
each build to see if something I actually do need to worry about turns
up.  It has happened, in which case I'm thankful for the message.
(Although it would be nice if there were a way to generate more context.
Once one was for an undefined variable 'n', which was not easy to find
using a text editor.)

Terry Therneau

   



[Rd] R CMD check tells me 'no visible binding for globalvariable'
Therneau, Terry M., Ph.D.