Skip to content

Commit

Permalink
Merge pull request #31 from clemasso/develop
Browse files Browse the repository at this point in the history
fix issue in residual output when tests fail
  • Loading branch information
clemasso authored Aug 21, 2024
2 parents 86d7dbc + 0351575 commit 868e764
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

* solve issue in residual output when tests fail


## [2.1.0] - 2024-07-18

Expand Down
10 changes: 7 additions & 3 deletions R/tempdisagg.R
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ plot.JD3TempDisaggI<-function(x, ...){


normality <- matrix(unlist(extr_normality), nrow = 4, ncol = 2, byrow = TRUE,
dimnames = list(c("mean", "skewness", "kurtosis", "test(doornikhansen)"), c("value", "p-value")))
dimnames = list(c("mean", "skewness", "kurtosis", "normality(doornikhansen)"), c("value", "p-value")))
independence <- matrix(unlist(extr_independence), nrow = 1, ncol = 2, byrow = TRUE,
dimnames = list(c("ljung_box"), c("value", "p-value")))
randomness <- matrix(unlist(extr_randomness), nrow = 4, ncol = 2, byrow = TRUE,
Expand All @@ -409,6 +409,10 @@ plot.JD3TempDisaggI<-function(x, ...){
}

get_result_item <- function(jd3_obj, item){
return(tryCatch(rjd3toolkit::result(jd3_obj, item),
error=function(err) NaN))
rslt_item <- tryCatch(rjd3toolkit::result(jd3_obj, item),
error = function(err) list(value = NaN, pvalue = NaN))
if(is.null(rslt_item)){
rslt_item <- list(value = NA, pvalue = NA)
}
return(rslt_item)
}

0 comments on commit 868e764

Please sign in to comment.