[R] bladder1 dataset in survival library

Marc Schwartz marc_schwartz at me.com
Tue Apr 21 03:43:46 CEST 2009


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.
>>
>>
>> Thanks,
>> Petra
>
> 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


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




More information about the R-help mailing list