[R] bladder1 dataset in survival library

David Winsemius dwinsemius at comcast.net
Tue Apr 21 05:18:35 CEST 2009


On Apr 20, 2009, at 9:43 PM, Marc Schwartz wrote:

> On Apr 20, 2009, at 8:14 PM, David Winsemius wrote:
>
>>
>> On Apr 20, 2009, at 6:06 PM, Petra Buzkova wrote:
>>
>>> Hello,
>>>
>>> In package survival should be a dataset bladder1.
>>> http://stat.ethz.ch/R-manual/R-devel/library/survival/html/bladder.html
>>>
>>> I can not open it (not found).
>>
>> In the documentation for my installation of survival, version  
>> 2.34-1,  the help page only lists bladder and bladder2.  
>> Furthermore, executing data(bladder2) gives me a "data  
>> set'bladder2' not found" warning. Updating from source to 2.35-4   
>> on the Mac does not improve the situation. The link to the help  
>> page you are offering is to the r-devel tree so perhaps this  
>> question should have gone to Dr. Lumley?
>>
>>
>>>
>>> Both bladder and bladder2 are there.
>>
>> You are luckier than I.
>>>
>
> David,
>
> You might want to try to exit from your R session and open a new  
> one, or detach(package:survival) and then re-load:


Restarting R and loading only survival does not change the warning  
from data(bladder2) for me, but using str (for the first time) gives  
the same results as you offered:

 > str(bladder2)
'data.frame':	178 obs. of  8 variables:
  $ id    : int  1 2 3 4 5 5 6 7 8 8 ...
  $ rx    : num  1 1 1 1 1 1 1 1 1 1 ...
  $ number: int  1 2 1 5 4 4 1 1 1 1 ...
  $ size  : int  3 1 1 1 1 1 1 1 3 3 ...
  $ start : int  0 0 0 0 0 6 0 0 0 5 ...
  $ stop  : int  1 4 7 10 6 10 14 18 5 18 ...
  $ event : num  0 0 0 0 1 0 0 0 1 0 ...
  $ enum  : num  1 1 1 1 1 2 1 1 1 2 ...
 > data(bladder2)
Warning message:
In data(bladder2) : data set 'bladder2' not found

So I ask myself, why would data(bladder2) fail? It appears that I do  
not completely understand the data() function.

A snippet from the output of data():
Data sets in package ‘survival’:

aml (leukemia)                    Acute Myelogenous Leukemia survival  
data
bladder                           Bladder Cancer Recurrences
bladder1 (bladder)                Bladder Cancer Recurrences
bladder2 (bladder)                Bladder Cancer Recurrences

So bladder1 and bladder2 are part of bladder? It appears so. From the  
help page:
"Where the datasets have a different name from the argument that  
should be used to retrieve them the index will have an entry like  
beaver1 (beavers)which tells us that dataset beaver1 can be retrieved  
by the call data(beaver)."

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list