From: dscott Date: Fri, 29 Jan 2016 02:30:36 +0000 (+0000) Subject: Add back code for xtable.lagImpact X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6b6637a44351d476b8f140d48bfc3597747bee27;p=xtable.git Add back code for xtable.lagImpact git-svn-id: svn://scm.r-forge.r-project.org/svnroot/xtable@107 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- diff --git a/pkg/NAMESPACE b/pkg/NAMESPACE index c912d90..f5c4c69 100644 --- a/pkg/NAMESPACE +++ b/pkg/NAMESPACE @@ -53,7 +53,7 @@ S3method("xtable", "summary.gmsar") S3method("xtable", "stsls") S3method("xtable", "summary.stsls") S3method("xtable", "sarlm.pred") -###S3method("xtable", "lagImpact") +S3method("xtable", "lagImpact") S3method("xtable", "splm") S3method("xtable", "summary.splm") S3method("xtable", "sphet") diff --git a/pkg/R/xtable.R b/pkg/R/xtable.R index 6cf0e17..4f1973d 100644 --- a/pkg/R/xtable.R +++ b/pkg/R/xtable.R @@ -399,14 +399,14 @@ xtable.sarlm.pred <- function(x, caption = NULL, label = NULL, align = NULL, ### This method removed because of the need to copy code to pass CRAN checks ### lagImpactMat is neither exported nor documented in spdep -### lagImpact objects -## xtable.lagImpact <- function(x, caption = NULL, label = NULL, align = NULL, -## digits = NULL, display = NULL, -## auto = FALSE, ...) { -## xtable(spdep:::lagImpactMat(x), caption = caption, label = label, -## align = align, digits = digits, -## display = display, auto = auto, ...) -## } +###lagImpact objects +xtable.lagImpact <- function(x, caption = NULL, label = NULL, align = NULL, + digits = NULL, display = NULL, + auto = FALSE, ...) { + xtable(lagImpactMat(x), caption = caption, label = label, + align = align, digits = digits, + display = display, auto = auto, ...) +} ### package splm ### splm objects diff --git a/pkg/man/xtable-internal.Rd b/pkg/man/xtable-internal.Rd index afd4728..a57ab00 100644 --- a/pkg/man/xtable-internal.Rd +++ b/pkg/man/xtable-internal.Rd @@ -1,5 +1,6 @@ \name{xtable-internal} \alias{xtableLSMeans} +\alias{lagImpactMat} \title{Internal xtable Functions} \description{ diff --git a/pkg/vignettes/OtherPackagesGallery.Rnw b/pkg/vignettes/OtherPackagesGallery.Rnw index fff3c40..ffd5f95 100644 --- a/pkg/vignettes/OtherPackagesGallery.Rnw +++ b/pkg/vignettes/OtherPackagesGallery.Rnw @@ -147,27 +147,23 @@ predictor types. xtable(p2) @ %def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% xtable.lagImpactMat removed because of problems with unexported function -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsubsection{\code{lagImpact} objects} +\label{sec:codelagimpact-objects} -%% \subsubsection{\code{lagImpact} objects} -%% \label{sec:codelagimpact-objects} +The \code{xtable} method returns the values of direct, indirect and +total impacts for all the variables in the model. The class +\code{lagImpact} has two different sets of attributes according to if +simulations are used. But the \code{xtable} method always returns the +three components of the non-simulation case. -%% The \code{xtable} method returns the values of direct, indirect and -%% total impacts for all the variables in the model. The class -%% \code{lagImpact} have two different sets of attributes according to if -%% simulations are used. But the \code{xtable} method always returns the -%% three components of the non-simulation case. - -%% <>= -%% xtable(imp.exact) -%% @ %def +<>= +xtable(imp.exact) +@ %def -%% \p -%% <>= -%% xtable(imp.sim) -%% @ %def +\p +<>= +xtable(imp.sim) +@ %def \subsubsection{\code{spautolm} objects} @@ -237,15 +233,12 @@ xtable(GM) @ %def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% xtable.lagImpactMat removed because of problems with unexported function -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% The \code{xtable} method works the same on impacts of \code{splm} models. +The \code{xtable} method works the same on impacts of \code{splm} models. -%% <>= -%% xtable(imp.spml) -%% @ %def +<>= +xtable(imp.spml) +@ %def \subsection{The package \pkg{sphet}} \label{sec:package-pkgsphet} @@ -280,14 +273,12 @@ xtable(res.stsls) xtable(res.gstsls) @ %def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% xtable.lagImpactMat removed because of problems with unexported function -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% \code{sphet} also provides a method for computing impacts. -%% <>= -%% xtable(imp.gstsls) -%% @ %def +\code{sphet} also provides a method for computing impacts. + +<>= +xtable(imp.gstsls) +@ %def \section{The \pkg{zoo} package} \label{sec:pkgzoo-package}