From pdalgd at gmail.com  Tue Apr 17 10:58:54 2018
From: pdalgd at gmail.com (peter dalgaard)
Date: Tue, 17 Apr 2018 10:58:54 +0200
Subject: [Rd] strange warning: data() error?
In-Reply-To: <52821B55-4853-4D91-98D7-AE0831EE4913@comcast.net>
References: <bb6fa2$98mdev@ironport10.mayo.edu>
 <38FCD0F3-12D7-4B9E-956D-3F9C54E12107@comcast.net>
 <52821B55-4853-4D91-98D7-AE0831EE4913@comcast.net>
Message-ID: <049192EC-4F73-442A-B21C-52753C95578D@gmail.com>


> On 17 Apr 2018, at 01:08 , David Winsemius <dwinsemius at comcast.net> wrote:
> 
> 
> Hypothesis:   datasets in a ..library/data/Rdata.rds file whose listing does not match the name of the dataset from which it is derived will cause the behavior in question.

Yes, because data() originally goes looking for a file with a matching name, then loads/reads/executes it depending on file extension. However, some files can generate objects with a different name - or several such objects. Turning LazyData on doesn't change the semantics of data() (by design, I guess).

So survival's source "data" directory has cgd.Rda with cgd and cgd0, but no cgd0.Rda, this is reflected in the "datalist" file in the installed package:

data pd$ more datalist 
bladder: bladder bladder1 bladder2
cancer
cgd: cgd cgd0
colon
flchain
genfan
heart: heart jasa jasa1

 
-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



[Rd] strange warning: data() error?
peter dalgaard