robjhyndman / demography

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

Read dataset using `hmd` #45

Closed vitaMiao closed 3 years ago

vitaMiao commented 3 years ago

Hi Prof Hyndman, I noticed that NAs are introduced when read in the dataset using hmd method, it might because the HMD dataset now includes an age group which is named "110+", and when converting the 'age' column into a numeric vector, "110+" is converted into NA by coercion.

robjhyndman commented 3 years ago

The NAs in the returned object are actually when the rate is 0/0. However, there were some NA warnings produced which were misleading and are now suppressed in https://github.com/robjhyndman/demography/commit/9ffa6fa93119ff20840dbec8dfcda455f79f1101