[R] Help with sample function

Austin, Matt maustin at amgen.com
Wed Jun 7 17:11:55 CEST 2006


I couldn't help but respond to this one, it's not often I see my own name.

Using data from the survival library:

library(survival)
lung[1:10, c('time', 'status')]
Surv(lung$time, lung$status)[1:10]

--Matt

Matt Austin
Statistician
Amgen, Inc
800 9AMGEN9 x77431
805-447-7431




-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Matthew Austin
Sent: Wednesday, June 07, 2006 6:57 AM
To: r-help at stat.math.ethz.ch
Subject: [R] Help with sample function


I have generated some some survival times and censoring indicators. 
Thus I have an ordered pair for each observation. How do I sample these 
ordered paris? I only know how to sample from a vector? I would 
appreciate any help I could get.

Thanks
Matt

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html



More information about the R-help mailing list