knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

smgenerics

CRAN status Lifecycle: experimental Travis build status AppVeyor build status Codecov test coverage

The goal of smgenerics is to extend the generics package for less known methods that are part of various statistical models. The motivation is exactly the same with generics, i.e. to reduce dependencies by providing a set of generic methods that can be imported.

Installation

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("kvasilopoulos/smgenerics")

Usage

A very characteristic example is the packages that are using Vector Autoregressive modelling like vars and svars. These packages require the the use of irf(Impulse Response Funcion) and hd (Historical Decomposition) generics to function.

library(smgenerics)

irf

fevd

To use smgenerics with your package, import and re-export the generic.

#' @importFrom smgenerics irf
#' @export
smgenerics::irf

Please note that the 'smgenerics' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms. [Copied to clipboard]



kvasilopoulos/smgenerics documentation built on June 30, 2019, 2:12 a.m.