We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I've verified that my "price" and "from_date" parameters are numeric, but I get this error:
Error in price * multipliers : non-numeric argument to binary operator
Reproducible code:
require(priceR) reproducible.df <- data.frame(mmhinco = as.numeric("10", "20", "30"), year = as.numeric("1980", "1999", "2012")) reproducible.df$in_2018_dollars <- adjust_for_inflation(price = "mmhinco", from_date = "year" , "US", to_date = 2018)
is.numeric(reproducible.df$mmhinco) [1] TRUE is.numeric(reproducible.df$year) [1] TRUE
The text was updated successfully, but these errors were encountered:
Thanks for the excellent reproducible example, it makes it easy to diagnose.
Your code is almost there, try this:
require(priceR) reproducible.df <- data.frame(mmhinco = as.numeric("10", "20", "30"), year = as.numeric("1980", "1999", "2012")) reproducible.df$in_2018_dollars <- adjust_for_inflation(price = reproducible.df$mmhinco, from_date = reproducible.df$year , "US", to_date = 2018) # View results reproducible.df # mmhinco year in_2018_dollars # 1 10 1980 30.47105
Sorry, something went wrong.
Thanks for the quick solution!
No branches or pull requests
I've verified that my "price" and "from_date" parameters are numeric, but I get this error:
Reproducible code:
The text was updated successfully, but these errors were encountered: