https://github.com/nacnudus/deflator
Deflate and inflate UK Prices by GDP
https://github.com/nacnudus/deflator
Last synced: 2 months ago
JSON representation
Deflate and inflate UK Prices by GDP
- Host: GitHub
- URL: https://github.com/nacnudus/deflator
- Owner: nacnudus
- License: other
- Created: 2019-12-01T21:49:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-03T23:23:36.000Z (over 5 years ago)
- Last Synced: 2025-01-05T18:28:13.151Z (4 months ago)
- Language: HTML
- Homepage:
- Size: 228 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# deflator
The {deflator} package is a demonstration of how to create a simple package. It
has one function, `flate_gdp()`, for inflating or deflating UK prices by GDP.
It also has one dataset, `gdp_deflator`, which is a data frame of year-on-year
inflation rates published on
[GOV.UK](https://www.gov.uk/government/statistics/gdp-deflators-at-market-prices-and-money-gdp-march-2019-quarterly-national-accounts).## Installation
You can install from [github](https://github.com/nacnudus/deflator) with:
```r
devtools::install_github("nacnudus/deflator")
```## Example
Inflate £100 from 2017 prices to 2019 prices, by GDP.
```{r inflate}
library(deflator)
flate_gdp(100, 2017, 2019)
```Go back again: deflate £103 from 2019 prices to 2017 prices, by GDP.
```{r deflate}
flate_gdp(103.9335, 2019, 2017)
```