Nothing
#' @rdname x13
#' @name x13
#' @export
jx13 <- function(series, spec = c("RSA5c", "RSA0", "RSA1", "RSA2c", "RSA3", "RSA4c", "X11"),
userdefined = NULL){
if (!is.ts(series)) {
stop("The series must be a time series")
}
UseMethod("jx13", spec)
}
#' @export
jx13.SA_spec <- function(series, spec, userdefined = NULL){
if (!inherits(spec, "X13"))
stop("use only with c(\"SA_spec\",\"X13\") class object")
# To create the Java objects
if (is.null(s_estimate(spec))) {
# For the X-11 specification
jrspec <- .jcall("jdr/spec/x13/X13Spec", "Ljdr/spec/x13/X13Spec;", "of", "X11")
} else {
jrspec <- .jcall("jdr/spec/x13/X13Spec", "Ljdr/spec/x13/X13Spec;", "of", "RSA0")
}
jdictionary <- spec_regarima_X13_r2jd(spec, jrspec)
seasma <- specX11_r2jd(spec, jrspec, freq = frequency(series))
spec_benchmarking_r2jd(rspec = spec, jdspec = jrspec)
jspec <- .jcall(jrspec, "Lec/satoolkit/x13/X13Specification;", "getCore")
jrslt <- .jcall("ec/tstoolkit/jdr/sa/Processor", "Lec/tstoolkit/jdr/sa/X13Results;", "x13", ts_r2jd(series), jspec, jdictionary)
jrslt <- new(Class = "X13_java", internal = jrslt)
jSA(result = jrslt, spec = jrspec, dictionary = jdictionary)
}
#' @export
jx13.character <- function(series, spec = c("RSA5c", "RSA0", "RSA1", "RSA2c", "RSA3", "RSA4c", "X11"),
userdefined = NULL){
spec <- match.arg(spec)
# To create the Java objects
jrspec <- .jcall("jdr/spec/x13/X13Spec", "Ljdr/spec/x13/X13Spec;", "of", spec)
jspec <- .jcall(jrspec, "Lec/satoolkit/x13/X13Specification;", "getCore")
jdictionary <- .jnew("jdr/spec/ts/Utility$Dictionary")
jrslt <- .jcall("ec/tstoolkit/jdr/sa/Processor", "Lec/tstoolkit/jdr/sa/X13Results;", "x13", ts_r2jd(series), jspec, jdictionary)
jrslt <- new(Class = "X13_java", internal = jrslt)
jSA(result = jrslt, spec = jrspec, dictionary = jdictionary)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.