if (FALSE) {
require(sp)
require(survival)
d = data.frame(
x=runif(40)*1.5,
y = runif(40),
age=as.integer(20+30*runif(40)),
sex = sample(c("M","F"),40,TRUE)
)
coordinates(d)=~x+y
d$surv = Surv(as.integer(5+20*runif(40)),runif(40)>.9)
clear3d();surv3d(d,d$surv,baseplane=TRUE,basegrid=TRUE)
clear3d();surv3d(d,d$surv,baseplane=TRUE,basegrid=TRUE,pstyle="t",lalpha=0.5,lwd=3,palpha=1)
}
Run the code above in your browser using DataLab