robjhyndman / demography

demography package for R
https://pkg.robjhyndman.com/demography
73 stars 25 forks source link

Coding problem #18

Closed Vanee27 closed 5 years ago

Vanee27 commented 8 years ago

Hello,

   I'm using the demography package to forecast Mauritian mortality rates. Mauritian data is not available in www.mortality.org. I have formatted my data in the same format as in Human mortality. But when I am trying to plot my data, it is giving a warning message : 

\ total is my demogdata object

plot.demogdata(total) Error in plot.window(...) : need finite 'xlim' values In addition: Warning messages: 1: In min(x) : no non-missing arguments to min; returning Inf 2: In max(x) : no non-missing arguments to max; returning -Inf

I'm having the same result for :

total.fit=fdm(total,order=4) Error in if (max.age < max(ages)) data <- extract.ages(data, min(ages):max.age, : missing value where TRUE/FALSE needed

If the data is 1x1 it works perfectly. However it does not work for data (5x1). It will be very grateful if you could help me. Thank you.

robjhyndman commented 8 years ago

Please provide a minimal reproducible example.