export("caption<-", "caption", "label", "label<-",
"align<-", "align", "digits<-", "digits", "display<-",
"display", "xtable",
- "xtableMatharray","xtableList", "xtablelsmeans",
+ "xtableMatharray","xtableList", "xtableLSMeans",
"print.xtable", "print.xtableMatharray", "print.xtableList",
"toLatex.xtable",
"autoformat", "xalign", "xdigits", "xdisplay")
S3method("xtable", "summary.splm")
S3method("xtable", "sphet")
S3method("xtable", "summary.sphet")
-
+S3method("xtable", "spautolm")
+S3method("xtable", "summary.spautolm")
return(xtable(as.ts(x), ...))
}
-
+### Date: Fri, 29 May 2015 11:41:04 +0200
+### From: Martin G. <martin.gubri@framasoft.org>
+### Subject: [xtable] Code for spdep, splm and sphet objects outputs
### package spdep
### sarlm objects
xtable.sarlm <- function(x, caption = NULL, label = NULL, align = NULL,
return(x)
}
+### spautolm objects: added by David Scott, 6/1/2016, after suggestion by
+### Guido Schulz
+### Date: Wed, 29 Apr 2015 10:45:16 +0200
+### Guido Schulz <schulzgu@student.hu-berlin.de>
+xtable.spautolm <- function(x, caption = NULL, label = NULL, align = NULL,
+ digits = NULL, display = NULL, auto = FALSE, ...) {
+ return(xtable.summary.sarlm(summary(x), caption = caption, label = label,
+ align = align, digits = digits,
+ display = display, auto = auto))
+}
+
+xtable.summary.spautolm <- function(x, caption = NULL, label = NULL,
+ align = NULL, digits = NULL,
+ display = NULL, auto = FALSE, ...) {
+ return(xtable.summary.sarlm(summary(x), caption = caption, label = label,
+ align = align, digits = digits,
+ display = display, auto = auto))
+}
+
+
### gmsar objects
xtable.gmsar <- function(x, caption = NULL, label = NULL, align = NULL,
digits = NULL, display = NULL, auto = FALSE, ...) {
return(xtable.summary.sarlm(summary(x), caption = caption, label = label,
align = align, digits = digits,
- display = display, auto = auto))
+ display = display, auto = auto, ...))
}
xtable.summary.gmsar <- function(x, caption = NULL, label = NULL, align = NULL,
digits = NULL, display = NULL, auto = FALSE, ...) {
return(xtable.summary.sarlm(summary(x), caption = caption, label = label,
align = align, digits = digits,
- display = display, auto = auto))
+ display = display, auto = auto, ...))
}
xtable.summary.stsls <- function(x, caption = NULL, label = NULL, align = NULL,
attr(xList, "message") <- attr(x, "message")\r
attr(xList, "caption") <- caption\r
attr(xList, "label") <- label\r
- class(xList) <- c("xtableList", "data.frame")\r
+ class(xList) <- c("xtableList")\r
return(xList)\r
}\r
\r
\r
\r
### Uses xtableList\r
-xtablelsmeans <- function(x, caption = NULL, label = NULL,\r
+xtableLSMeans <- function(x, caption = NULL, label = NULL,\r
align = NULL, digits = NULL,\r
display = NULL, auto = FALSE,\r
...){\r
\setcounter{tocdepth}{2}\r
\begin{document}\r
\r
-\title{The \code{xtableList} Gallery}\r
-\author{David J. Scott}\r
+\title{\bfseries\Large The \code{xtableList} Gallery}\r
+\author{\bfseries David J. Scott}\r
\maketitle\r
\r
\tableofcontents\r
\label{sec:lsmeans}\r
\r
Summaries from the \code{lsmeans} function from the \pkg{lsmeans}\r
-package can easily be produced.\r
+package can easily be produced using the function\r
+\code{xtableLSMeans}. This function produces a list of \pkg{xtable}\r
+objects.\r
\r
\r
<<lsmeans>>=\r
warp.lm <- lm(breaks ~ wool*tension, data = warpbreaks)\r
warp.lsm <- lsmeans(warp.lm, ~ tension | wool)\r
warp.sum <- summary(warp.lsm, adjust = "mvt")\r
-warp.xtblList <- xtablelsmeans(warp.sum, digits = c(0,0,2,2,0,2,2))\r
+warp.xtblList <- xtableLSMeans(warp.sum, digits = c(0,0,2,2,0,2,2))\r
str(warp.xtblList)\r
@ %def\r
\r