# NOT RUN {
# Radiationdata$radio is a dataset exported from ScanIt software ================
radio <- Radiationdata$radio
# Load time points when the patients number ========
# at risk reported (i.e. trisk in month) =========
trisk <- Radiationdata$trisk
# Load the numbers of patients at risk reported (i.e. nrisk) ========
# at the time points (trisk) =============
nrisk.radio <- Radiationdata$nrisk.radio
##### Use the trisk and nrisk as input ==========
pre_radio_1 <- preprocess(dat=Radiationdata$radio, trisk=trisk,nrisk=nrisk.radio,maxy=100)
est_radio_1 <- getIPD(prep=pre_radio_1,armID=0,tot.events=NULL)
# Output include reconstructed individual patients data
head(est_radio_1$IPD)
# Plot
plot(est_radio_1)
##### When trisk and nrisk were not available, then we must input ========
##### the initial number of patients ========
pre_radio_2 <- preprocess(dat=Radiationdata$radio, totalpts=213,maxy=100)
est_radio_2 <- getIPD(prep=pre_radio_2,armID=0,tot.events=NULL)
# Output include reconstructed individual patients data
head(est_radio_2$IPD)
# Plot
plot (est_radio_2)
# }
Run the code above in your browser using DataLab