R/zzz.R

Defines functions trySolve .onAttach

#' @importFrom graphics plot.default
#' @importFrom stats lm
#' @importFrom stats pt
#' @import checkmate
#' @importFrom matrixStats colCumsums
#' @importFrom matrixStats colDiffs
#' @importFrom MASS ginv

trySolve <- function(x) {
  out <- try(solve(x), silent = TRUE)
  if (inherits(out, "try-error")) {
    out <- MASS::ginv(x)
  }
  return(out)
}

.onAttach <- function(libname, pkgname) {
  psm = paste("cointReg", paste0("(v", utils::packageVersion("cointReg"), "):"),
              "Parameter Estimation and Inference in a",
              "Cointegrating Regression.")
  packageStartupMessage(psm)
}

Try the cointReg package in your browser

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

cointReg documentation built on May 2, 2019, 3:45 a.m.