I am struggling with using demogdata in R demography package. my code is as below
demogdata("Mx","Exposures",ages = 0:105, years= 1961:2016, "mortality","UK", "Male")
Mx and Exposures are my text files(dataset) which contains death rates and exposures from ages 0:105 and for years 1961:2016. the rows and columns in both are the same. i am getting the following error message
Error in if (nrow(pop) != p | ncol(pop) != n) stop("data and pop are of different size") : argument is of length zero
the other code i tried is as below
demogdata(Mx,Exposures,ages = 0:105, years= 1961:2016, "mortality","UK", "Male") Blockquote
and get the following error Error in demogdata(Mx, Exposures, ages = 0:105, years = 1961:2016, "mortality", : Number of ages doesn't match data
Any help is appreciated.