[Rd] strange warning: data() error?

peter dalgaard pdalgd at gmail.com
Tue Apr 17 10:58:54 CEST 2018


> 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



More information about the R-devel mailing list