try something like:

surv.data <- data.frame(times = rexp(100, 1/10), events = rbinom(100, 
1, 0.7))
surv.data[sample(nrow(surv.data), replace = TRUE), ]


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Matthew Austin" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, June 07, 2006 3:57 PM
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
>
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

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

Reply via email to