#loads and show
data(demoita)
head(demoita)
#creates sim92 life and actuarial table
lxsim92<-demoita$SIM92
lxsim92<-lxsim92[!is.na(lxsim92) & lxsim92!=0]
xsim92<-seq(0,length(lxsim92)-1,1)
#create the table
sim92lt=new("lifetable",x=xsim92,lx=lxsim92,name="SIM92")
plot(sim92lt)
Run the code above in your browser using DataLab