]> git.donarmstrong.com Git - xtable.git/blobdiff - pkg/R/xtable.R
Applied patches supplied by Martin Gubri for spdep
[xtable.git] / pkg / R / xtable.R
index 4f1973df0b4f37c5d207397c7d49abf22b5ae162..c2380df5a3fc28063d01d8d37c209a39ef110cf4 100644 (file)
@@ -395,14 +395,12 @@ xtable.sarlm.pred <- function(x, caption = NULL, label = NULL, align = NULL,
                 display = display, auto = auto, ...))
 }
 
-
-### This method removed because of the need to copy code to pass CRAN checks
-### lagImpactMat is neither exported nor documented in spdep
-
-###lagImpact objects
+### lagImpact objects
 xtable.lagImpact <- function(x, caption = NULL, label = NULL, align = NULL,
                              digits = NULL, display = NULL,
                              auto = FALSE, ...) {
+  requireNamespace('spdep')
+  lagImpactMat <- get('lagImpactMat', environment(spdep::spdep))
   xtable(lagImpactMat(x), caption = caption, label = label,
          align = align, digits = digits,
          display = display, auto = auto, ...)