From therneau at mayo.edu  Thu Aug 28 15:49:29 2014
From: therneau at mayo.edu (Therneau, Terry M., Ph.D.)
Date: Thu, 28 Aug 2014 08:49:29 -0500
Subject: [Rd] no visible binding for global variable for data sets in a
	package
Message-ID: <31062c$94enn4@ironport10.mayo.edu>

Here is one rationale for the change, which was useful for my understanding

This arises in the survival package in the survexp function:
     survexp <- function(formula, data, weights, subset, na.action,.... ratetable=survexp.us)

The argument has been changed to survival::survexp.us, soon to be uploaded to CRAN.

Assume that a user has an object named "survexp.us" in their working data, and calls 
survexp without providing a ratetable arguement.  Should they get the package default or 
their own object?  I'd vote for the first, but the current behavior is the latter.  This 
was presented to me as "fixing a bug that has long been present, but we never noticed before."

Now, if the user adds "ratetable=survexp.us" to the call they should get their own 
object.  I've always hated computer systems that ignore explicit direction, assuming they 
know more than me.

Terry Therneau



[Rd] no visible binding for global variable for data sets in a package
Therneau, Terry M., Ph.D.