knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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.
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("kvasilopoulos/smgenerics")
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]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.