Skip to content

Commit eb219a3

Browse files
Merge pull request #209 from HughParsonage/release-2020-03-20
Release 2020 03 20
2 parents 9448610 + 861d191 commit eb219a3

File tree

74 files changed

+24602
-23632
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+24602
-23632
lines changed

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: grattan
22
Type: Package
33
Title: Australian Tax Policy Analysis
4-
Version: 1.8.0.0
5-
Date: 2019-11-16
4+
Version: 1.8.0.1
5+
Date: 2020-03-16
66
Authors@R: c(person("Hugh", "Parsonage", role = c("aut", "cre"), email = "hugh.parsonage@gmail.com"),
77
person("Tim", "Cameron", role = "aut"),
88
person("Brendan", "Coates", role = "aut"),
@@ -35,7 +35,7 @@ Imports:
3535
zoo (>= 1.5-5)
3636
LinkingTo:
3737
Rcpp
38-
RoxygenNote: 6.1.1
38+
RoxygenNote: 7.0.2
3939
Suggests:
4040
curl,
4141
dplyr,

NEWS.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,12 @@
1-
## 1.8.0.0
1+
## 1.8.0.1
22

3-
### Potentially breaking changes
4-
5-
* Pacakage `fy` is now used for operations involving financial years, notably validation of
6-
input. This has led to changes in error messages (below) as well as the weakening
7-
of some tests to omit checks of class attributes which were never intended to be
8-
relied on.
9-
10-
```r
11-
# Prev:
12-
fy2date("foo")
13-
#> Error: fy.yr contains non-FYs.
14-
15-
# Now
16-
#> Error: `x = "foo"` was not a valid financial year.
17-
```
3+
### Bug fixes
4+
Fixed issue with stringsAsFactors = FALSE being inconsistently applied
5+
with R 4.0
186

197
### Data
208

21-
* Update wage and labour force data
9+
* Update wage, CPI, and labour force data
2210

2311

2412

R/carer_payment.R

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,15 @@ carer_payment <- function(Date = NULL,
7676
}
7777

7878
class(fy.year) <- c("fy", "character") # for cbind.data.frame method
79-
input <- data.table(do.call(cbind.data.frame, mget(ls())))
79+
80+
the_args <- copy(ls())
81+
input <- data.table(ordering = seq_along(Date))
82+
83+
for (j in the_args) {
84+
v <- get(j)
85+
set(input, j = j, value = rep_len(v, nrow(input)))
86+
}
87+
8088

8189
#Rates, income test, and asset test same as age pension
8290

R/cpi_inflator.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#' If the SDMX connection fails, a message is emitted (not a warning) and
1313
#' the function contines as if \code{useABSConnection = FALSE}.
1414
#'
15-
#' The internal data was updated on 2019-10-29 to 2019-Q2.
15+
#' The internal data was updated on 2020-03-16 to 2019-Q4.
1616
#' If using \code{useABSConnection = TRUE}, ensure you have \code{rsdmx (>= 0.5-10)} up-to-date.
1717
#' @param allow.projection Should projections beyond the ABS's data be allowed?
1818
#' @param accelerate.above An integer setting the threshold for 'acceleration'.

R/cpi_inflator_quarters.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#' @param to_qtr (date in quarters) the date to be inflated to, where nominal price = real price. Must be of the form "YYYY-Qq" e.g. "1066-Q2".
55
#' @param adjustment Should there be an adjustment made to the index? Adjustments include 'none' (no adjustment), 'seasonal', or 'trimmed' [referring to trimmed mean]. By default, \code{seasonal}.
66
#' @param useABSConnection Should the function connect with ABS.Stat via an SDMX connection? By default set to \code{FALSE} in which case a pre-prepared index table is used. This is much faster and more reliable (in terms of errors), though of course relies on the package maintainer to keep the tables up-to-date.
7-
#' The internal data was updated on 2019-10-29 to 2019-Q2.
7+
#' The internal data was updated on 2020-03-16 to 2019-Q4.
88
#' If using \code{useABSConnection = TRUE}, ensure you have \code{rsdmx (>= 0.5-10)} up-to-date.
99
#' @return A vector of real prices.
1010
#' @export

R/lf_inflator.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#' If the SDMX connection fails, a message is emitted (not a warning) and
1616
#' the function contines as if \code{useABSConnection = FALSE}.
1717
#'
18-
#' The internal data was updated on 2019-11-15 to 2019-10-01.
18+
#' The internal data was updated on 2020-03-16 to 2020-01-01.
1919
#' @param allow.projection Logical. Should projections be allowed?
2020
#' @param use.month An integer (corresponding to the output of \code{data.table::month}) representing the month of the series used for the inflation.
2121
#' @param forecast.series Whether to use the forecast mean, or the upper or lower boundaries of the prediction intervals.

R/pension_supplement.R

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#' payment, with a message.
1717
#' @param overseas_absence Will the individual be living outside of Australia
1818
#' for more than 6 weeks of the upcoming year?
19-
#' @param seperated_couple Is the individual part of an illness separated couple,
19+
#' @param separated_couple Is the individual part of an illness separated couple,
2020
#' respite care couple, or partner imprisoned?
2121
#'
2222
#' @author Matthew Katzen
@@ -33,11 +33,11 @@ pension_supplement <- function(has_partner = FALSE,
3333
qualifying_payment = 'age_pension',
3434
per = c("year", "fortnight", "quarter"),
3535
overseas_absence = FALSE,
36-
seperated_couple = FALSE){
36+
separated_couple = FALSE){
3737

3838

3939

40-
if (any(!has_partner & seperated_couple)) {
40+
if (any(!has_partner & separated_couple)) {
4141
stop("incompatible values of `has_partner` and `partner_seperated`")
4242
}
4343

@@ -61,7 +61,16 @@ pension_supplement <- function(has_partner = FALSE,
6161
# Convert arguments to data table
6262
ls_np <- ls()[ls() != "per"]
6363
class(fy.year) <- c("fy", "character")
64-
input <- data.table(do.call(cbind.data.frame, mget(ls_np)))
64+
input <-
65+
data.table(has_partner = has_partner,
66+
age = age,
67+
n_dependants = n_dependants,
68+
parenting_payment = parenting_payment,
69+
Date = Date,
70+
fy.year = fy.year,
71+
qualifying_payment = qualifying_payment,
72+
overseas_absence = overseas_absence,
73+
separated_couple = separated_couple)
6574

6675
eligible <- NULL
6776
input[, eligible := if_else(qualifying_payment %in% c('abstudy', 'austudy', 'parenting_payment', 'partner_allowance', 'special_benefit', 'widow_allowance'),
@@ -72,7 +81,7 @@ pension_supplement <- function(has_partner = FALSE,
7281

7382
max_rate_March_2016 <- NULL
7483
input[, max_rate_March_2016 :=
75-
if_else(has_partner & !seperated_couple,
84+
if_else(has_partner & !separated_couple,
7685
49,
7786
65)]
7887

R/sysdata.rda

1.08 KB
Binary file not shown.

R/wage_inflator.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#' If the SDMX connection fails, a message is emitted (not a warning) and
1111
#' the function contines as if \code{useABSConnection = FALSE}.
1212
#'
13-
#' The internal data was updated on 2019-11-15 to 2019-Q3.
13+
#' The internal data was updated on 2020-03-16 to 2019-Q4.
1414
#' @param allow.projection If set to \code{TRUE} the \code{forecast} package is used to project forward, if required.
1515
#' @param forecast.series Whether to use the forecast mean, or the upper or lower boundaries of the prediction intervals. A fourth option \code{custom} allows manual forecasts to be set.
1616
#' @param forecast.level The prediction interval to be used if \code{forecast.series} is \code{upper} or \code{lower}.

cran-comments.md

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,12 @@ This is a package update
33
## Test results
44
0 ERRORS | 0 WARNINGS | 1-2 NOTEs
55

6-
### Test environments:
7-
* Local Windows CRAN 3.6.1
8-
* Travis-CI: Ubuntu 14.04. R 3.5, 3.6, and dev (r76539)
9-
* Appveyor: dev (r76446) and release.
10-
* winbuilder: dev (r76539) and release.
6+
117

128

139

1410
NOTES:
1511

16-
Package archival / previous violation of policy.
17-
==> Vignettes using package 'taxstats' is now off by default
18-
==> Installation of taxstats packages now requires manual setting of
19-
environment variable
20-
21-
Possibly mis-spelled words in DESCRIPTION: ...
22-
==> Spellings are correct: 'repos' and 'taxstats' cannot be quoted as they are
23-
within R code.
24-
25-
URLs in angle brackets:
26-
==> Not appropriate since the URL is within R code.
27-
28-
Suggests or Enhances not in mainstream repositories: ...
29-
==> Normal due to taxstats dependency
30-
31-
## Note to CRAN: moderately-large vignette
32-
The vignette is quite lengthy and, if the environment variable is set,
33-
installs package 'taxstats', a 58 MB source package,
34-
each time the package is checked.
12+
stringsAsFactors = TRUE | FALSE both work now
3513

3614

0 commit comments

Comments
 (0)