Skip to content

bladder1 dataset in survival library

5 messages · Marc Schwartz, David Winsemius, Petra Buzkova

#
On Apr 20, 2009, at 6:06 PM, Petra Buzkova wrote:

            
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?
You are luckier than I.
David Winsemius, MD
Heritage Laboratories
West Hartford, CT

 > sessionInfo()
R version 2.8.1 Patched (2009-01-19 r47650)
i386-apple-darwin9.6.0

locale:
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] splines   stats     graphics  grDevices utils     datasets   
methods   base

other attached packages:
[1] lattice_0.17-20 Design_2.1-2    survival_2.35-4 Hmisc_3.5-2      
gstat_0.9-59    sp_0.9-32

loaded via a namespace (and not attached):
[1] cluster_1.11.12 grid_2.8.1      tools_2.8.1
#
On Apr 20, 2009, at 8:14 PM, David Winsemius wrote:

            
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:


 > library(survival)
Loading required package: splines

 > str(bladder)
'data.frame':	340 obs. of  7 variables:
  $ id    : int  1 1 1 1 2 2 2 2 3 3 ...
  $ rx    : num  1 1 1 1 1 1 1 1 1 1 ...
  $ number: int  1 1 1 1 2 2 2 2 1 1 ...
  $ size  : int  3 3 3 3 1 1 1 1 1 1 ...
  $ stop  : int  1 1 1 1 4 4 4 4 7 7 ...
  $ event : num  0 0 0 0 0 0 0 0 0 0 ...
  $ enum  : int  1 2 3 4 1 2 3 4 1 2 ...

 > str(bladder1)
'data.frame':	294 obs. of  11 variables:
  $ id       : int  1 2 3 4 5 6 6 7 8 9 ...
  $ treatment: Factor w/ 3 levels "placebo","pyridoxine",..: 1 1 1 1 1  
1 1 1 1 1 ...
  $ number   : int  1 1 2 1 5 4 4 1 1 1 ...
  $ size     : int  1 3 1 1 1 1 1 1 1 3 ...
  $ recur    : int  0 0 0 0 0 1 1 0 0 1 ...
  $ start    : int  0 0 0 0 0 0 6 0 0 0 ...
  $ stop     : int  0 1 4 7 10 6 10 14 18 5 ...
  $ status   : num  3 3 0 0 3 1 3 0 0 1 ...
  $ rtumor   : chr  "." "." "." "." ...
  $ rsize    : chr  "." "." "." "." ...
  $ enum     : num  1 1 1 1 1 1 2 1 1 1 ...

 > 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 ...

 > sessionInfo()
R version 2.9.0 Patched (2009-04-18 r48348)
i386-apple-darwin9.6.2

locale:
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] splines   stats     graphics  grDevices utils     datasets
[7] methods   base

other attached packages:
[1] survival_2.35-4


Based upon the diff for the bladder help page at:

http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/pkg/survival/man/bladder.Rd?root=survival&rev=11221&r1=11166&r2=11221

it was added in the last two months.


Petra, try either running update.packages() or installing R 2.9.0.

HTH,

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

            
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
1 day later
#
Thanks Mark, I got it now.
Thanks,
Petra

________________________________________
Petra Buzkova, PhD
Department of Biostatistics
University of Washington
206-897-1962 (phone)
206-616-4075 (fax)
Marc Schwartz wrote: