Skip to content

Commit

Permalink
Added citation
Browse files Browse the repository at this point in the history
  • Loading branch information
marberts committed Nov 11, 2023
1 parent 0ce92cc commit 5110687
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: gpindex
Title: Generalized Price and Quantity Indexes
Version: 0.5.0.9007
Version: 0.5.0.9008
Authors@R: c(
person("Steve", "Martin", role = c("aut", "cre", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0003-2544-9480"))
)
Expand Down
10 changes: 9 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,19 @@ A small package for calculating lots of different price indexes, and by extensio

## Installation

Get the stable release from CRAN.

```{r, eval = FALSE}
install.packages("gpindex")
```

The development version can be installed from GitHub.
The development version can be installed from R-Universe

```{r, eval = FALSE}
install.packages("gpindex", repos = c("https://marberts.r-universe.dev", "https://cloud.r-project.org"))
```

or directly from GitHub.

```{r, eval = FALSE}
pak::pak("marberts/gpindex")
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,19 @@ der Lippe (2001), and the CPI manual (2020) for bilateral price indexes.

## Installation

Get the stable release from CRAN.

``` r
install.packages("gpindex")
```

The development version can be installed from GitHub.
The development version can be installed from R-Universe

``` r
install.packages("gpindex", repos = c("https://marberts.r-universe.dev", "https://cloud.r-project.org"))
```

or directly from GitHub.

``` r
pak::pak("marberts/gpindex")
Expand Down
10 changes: 10 additions & 0 deletions inst/CITATION
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
bibentry(
bibtype = "Manual",
title = "{gpindex}: Generalized Price and Quantity Indexes",
author = person("Steve", "Martin", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0003-2544-9480")),
year = "2023",
doi = "10.5281/zenodo.10097742",
url = "https://cran.r-project.org/package=gpindex",
note = sprintf("R package version %s", meta$Version)
)
8 changes: 8 additions & 0 deletions tests/testthat/test-means.R
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,14 @@ test_that("grouping and balacing work", {
balanced(fisher_mean)(
c(1, NA, 3, 4), c(NA, 1, 1, 2), c(1, 2, NA, 4), na.rm = TRUE
), 4)
expect_equal(
balanced(fisher_mean)(x, xna, na.rm = TRUE),
sum(balanced(fisher_contributions)(x, xna, na.rm = TRUE)) + 1
)
expect_equal(
balanced(fisher_mean)(x, xna, na.rm = TRUE),
sum(balanced(fisher_contributions2)(x, xna, na.rm = TRUE)) + 1
)
})

test_that("error happen when expected", {
Expand Down

0 comments on commit 5110687

Please sign in to comment.