Hello, When i generate data with the code below there appear NA as part of the generated data, i prefer to have zero (0) instead of NA on my data. Is there a command i can issue to replace the NA with zero (0) even if it is after generating the data? Thank you library(survival)
p1<-0.8;b<-1.5;rr<-1000 for(i in 1:rr){ r<-runif(45,min=0,max=1) t<-rweibull(45,p1,b) w=Surv(r,t,type="interval2") x[1:45]<-(w[,1]) u<-x[1:45] y[1:45]<-(w[,2]) v<-y[1:45] } w u v Chris G Researcher Institute for Mathematical Research UPM ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.