HughParsonage / grattan

Common quantitative tasks for Australian policy analysts
25 stars 8 forks source link

cpi_inflator_general_date returning NAs #211

Closed MattCowgill closed 4 years ago

MattCowgill commented 4 years ago

It's unclear to me whether there is something wrong with the function, or if I have misunderstood the intended use (there are no examples in the documentation).


library(grattan)

cpi_inflator_general_date(from_nominal_price = 1, 
                          from_date = as.Date("2010-01-01"), 
                          to_date = as.Date("2020-01-01"))
#> [1] NA

cpi_inflator_general_date(from_nominal_price = 1, 
                          from_date = as.Date("2010-01-01"), 
                          to_date = as.Date("2020-01-01"),
                          adjustment = "none")
#> [1] NA

Created on 2020-05-28 by the reprex package (v0.3.0)

MattCowgill commented 4 years ago

what was the problem here, @HughParsonage ?

HughParsonage commented 4 years ago

When the date extended beyond the internal data, it just reported a missing value. It now pursues a forecast.