[Rd] strange warning: data() error?

David Winsemius dwinsemius at comcast.net
Tue Apr 17 01:08:03 CEST 2018


> On Apr 16, 2018, at 3:20 PM, David Winsemius <dwinsemius at comcast.net> wrote:
> 
>> 
>> On Apr 16, 2018, at 2:58 PM, Therneau, Terry M., Ph.D. via R-devel <r-devel at 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.
> 
> 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 <name 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



More information about the R-devel mailing list