R/utils.R

Defines functions diagOfVcov stats.format.perc capturePrint formatNameNumeric reportClassName

## Do not edit this file manually.
## It has been automatically generated from *.org sources.

## taken from "pcts"
.reportClassName <- function(object, class, trailer = "\n"){
    if(class(object) == class)
        cat('An object of class "', class, '"', trailer, sep = "")
    NULL
}

## s - character string.
## v - numeric vector.
## none - character string.
.formatNameNumeric <- function(s, v, none = " <None>"){
    if(length(v) == 0)
        paste0(s, none)
    else{
        wrk <- paste0(v, collapse=" ")
        paste0(s, wrk)
    }
}

.capturePrint <- function(x){ # used by show() methods to print polynomials
    capture.output(print(x))
}

# stats:::format.perc() is not exported, copy it here.
.stats.format.perc <- function (probs, digits)
    paste(format(100 * probs, trim = TRUE, scientific = FALSE, digits = digits), "%")

diagOfVcov <- function(object, ...){
    diag(vcov(object, ...))
}

setGeneric("diagOfVcov")

Try the sarima package in your browser

Any scripts or data that you put into this service are public.

sarima documentation built on Aug. 23, 2018, 9:03 a.m.