Re: [Rd] strange warning: data() error?

2018-04-17 Thread peter dalgaard

> On 17 Apr 2018, at 01:08 , David Winsemius  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@cbs.dk  Priv: pda...@gmail.com

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] strange warning: data() error?

2018-04-16 Thread David Winsemius

> On Apr 16, 2018, at 3:20 PM, David Winsemius  wrote:
> 
>> 
>> On Apr 16, 2018, at 2:58 PM, Therneau, Terry M., Ph.D. via R-devel 
>>  wrote:
>> 
>> A user asked me about this and I can't figure it out.
>> 
>> tmt% R
>> R Under development (unstable) (2018-04-09 r74565) -- "Unsuffered 
>> Consequences"
>> Copyright (C) 2018 The R Foundation for Statistical Computing
>> Platform: x86_64-pc-linux-gnu (64-bit)
>> 
>>> library(survival)
>>> data(cgd0)
>> Warning message:
>> In data(cgd0) : data set ‘cgd0’ not found
>> 
>> 
>> 
>> The data set is present and can be manipulated: data() is not required.  
>> Other data sets in the survival package don't generate this message.
> 
> On a Mac the Data Manager panel lists that dataset as "cgd0 (cgd)" and I get 
> the same warning with any dataset that has a similar appearance of  paren-name-paren> , even the `state.abb` vector that is displayed "state.abb 
> (state)" (without the quotes.)
> 
>> data('state.abb')
> Warning message:
> In data("state.abb") : data set ‘state.abb’ not found
>> str(state.abb)
> chr [1:50] "AL" "AK" "AZ" "AR" "CA" "CO" "CT" "DE" "FL" "GA" "HI" "ID" "IL" 
> "IN" "IA" "KS" "KY" "LA" "ME" "MD" "MA" ...
>> data(stack.loss)
> Warning message:
> In data(stack.loss) : data set ‘stack.loss’ not found
> 
> So I guess the message is don't feel picked upon. It seems to be an 
> infelicity shared by many other datasets even those in the canonical 
> 'datasets' package.

> survival_Rdata <- 
> readRDS("/Library/Frameworks/R.framework/Versions/3.4/Resources/library/survival/data/Rdata.rds")
> survival_Rdata
$bladder
[1] "bladder"  "bladder1" "bladder2"

$cancer
[1] "cancer"

$cgd
[1] "cgd"  "cgd0"

$colon
[1] "colon"

$flchain
[1] "flchain"

$genfan
[1] "genfan"

$heart
[1] "heart" "jasa"  "jasa1"

--- snip 

data(bladder2)
# Warning message:
# In data(bladder2) : data set ‘bladder2’ not found

data(mgus1)
# Warning message:
# In data(mgus1) : data set ‘mgus1’ not found

>  data(mgus1)
Warning message:
In data(mgus1) : data set ‘mgus1’ not found

> data("survexp.mn")
Warning message:
In data("survexp.mn") : data set ‘survexp.mn’ not found



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.

And Terry; After executing `data(package-"survival")` I must mention that the 
spelling of "Granulomatous" is not "Granulotomous", and neither is the spelling 
of "gammapathy", "gammapothy".


-- 

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   
-Gehm's Corollary to Clarke's Third Law

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] strange warning: data() error?

2018-04-16 Thread William Dunlap via R-devel
data(package="survival") gives, in part,

cgd Chronic Granulotomous Disease data
cgd0 (cgd)  Chronic Granulotomous Disease data
colon   Chemotherapy for Stage B/C colon cancer
flchain Assay of serum free light chain for 7874
subjects.
genfan  Generator fans
heart   Stanford Heart Transplant data
jasa (heart)Stanford Heart Transplant data
jasa1 (heart)   Stanford Heart Transplant data

The 'name1 (name2)' entries indicate that 'name'; is in the file
labelled name2.  If you run data(cgd) you get both cgd and cdg0
in .GlobalEnv;  if you run data(heart) you get heart, jasa, and jasa1.
I don't think this has changed recently, although it might be nice
if the names were handled more symmetrically, like alias entries
in help files.


Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Mon, Apr 16, 2018 at 2:58 PM, Therneau, Terry M., Ph.D. via R-devel <
r-devel@r-project.org> wrote:

> A user asked me about this and I can't figure it out.
>
> tmt% R
> R Under development (unstable) (2018-04-09 r74565) -- "Unsuffered
> Consequences"
> Copyright (C) 2018 The R Foundation for Statistical Computing
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> > library(survival)
> > data(cgd0)
> Warning message:
> In data(cgd0) : data set ‘cgd0’ not found
>
> 
>
> The data set is present and can be manipulated: data() is not required.
> Other data sets in the survival package don't generate this message.
>
> Terry T.
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] strange warning: data() error?

2018-04-16 Thread David Winsemius

> On Apr 16, 2018, at 2:58 PM, Therneau, Terry M., Ph.D. via R-devel 
>  wrote:
> 
> A user asked me about this and I can't figure it out.
> 
> tmt% R
> R Under development (unstable) (2018-04-09 r74565) -- "Unsuffered 
> Consequences"
> Copyright (C) 2018 The R Foundation for Statistical Computing
> Platform: x86_64-pc-linux-gnu (64-bit)
> 
> > library(survival)
> > data(cgd0)
> Warning message:
> In data(cgd0) : data set ‘cgd0’ not found
> 
> 
> 
> The data set is present and can be manipulated: data() is not required.  
> Other data sets in the survival package don't generate this message.

On a Mac the Data Manager panel lists that dataset as "cgd0 (cgd)" and I get 
the same warning with any dataset that has a similar appearance of  , even the `state.abb` vector that is displayed "state.abb 
(state)" (without the quotes.)

> data('state.abb')
Warning message:
In data("state.abb") : data set ‘state.abb’ not found
> str(state.abb)
 chr [1:50] "AL" "AK" "AZ" "AR" "CA" "CO" "CT" "DE" "FL" "GA" "HI" "ID" "IL" 
"IN" "IA" "KS" "KY" "LA" "ME" "MD" "MA" ...
> data(stack.loss)
Warning message:
In data(stack.loss) : data set ‘stack.loss’ not found

So I guess the message is don't feel picked upon. It seems to be an infelicity 
shared by many other datasets even those in the canonical 'datasets' package.


> 
> Terry T.
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   
-Gehm's Corollary to Clarke's Third Law

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] strange warning: data() error?

2018-04-16 Thread Therneau, Terry M., Ph.D. via R-devel

A user asked me about this and I can't figure it out.

tmt% R
R Under development (unstable) (2018-04-09 r74565) -- "Unsuffered Consequences"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

> library(survival)
> data(cgd0)
Warning message:
In data(cgd0) : data set ‘cgd0’ not found



The data set is present and can be manipulated: data() is not required.  Other data sets 
in the survival package don't generate this message.


Terry T.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel