Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
TanguyBarthelemy authored Oct 4, 2024
2 parents ab9846c + 1874c84 commit 2803c1f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions R/jd2r.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ NULL
}
}


.jd2r_regression_item <- function(s) {
desc <- .jcall(s, "S", "getDescription")
val <- .jcall(s, "D", "getCoefficient")
stderr <- .jcall(s, "D", "getStdError")
pval <- .jcall(s, "D", "getPvalue")
res <- matrix(c(val, stderr, val/stderr, pval), nrow = 1)
colnames(res) <- c("Estimate", "Std. Error", "T-stat", "Pr(>|t|)")
rownames(res) <- desc
res
}
#' @export
#' @rdname jd3_utilities
.r2jd_tsdata<-function(s){
Expand Down
2 changes: 2 additions & 0 deletions R/jd3rslts.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@
return(.jevalArray(s, silent=TRUE))
} else if (.jinstanceof(s, "jdplus/toolkit/base/api/stats/StatisticalTest")) {
return(.jd2r_test(s))
} else if (.jinstanceof(s, "jdplus/toolkit/base/api/timeseries/regression/RegressionItem")) {
return(.jd2r_regression_item(s))
} else {
return(.jcall(s, "S", "toString"))
}
Expand Down
3 changes: 1 addition & 2 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ NULL
# what's your java version? Need >= 17
jversion <- .jcall('java.lang.System','S','getProperty','java.version')
if (jversion < "17") {
stop(paste("Your java version is ", jversion,
". N or higher.", sep=""))
stop(sprintf("Your java version is %s. 17 or higher is needed.", jversion))
}

proto.dir <- system.file("proto", package = pkgname)
Expand Down
Binary file modified inst/java/jdplus-toolkit-base-core-3.2.5-SNAPSHOT.jar
Binary file not shown.

0 comments on commit 2803c1f

Please sign in to comment.