### anova objects
-
xtable.anova <- function(x, caption = NULL, label = NULL, align = NULL,
digits = NULL, display = NULL, auto = FALSE, ...) {
suggested.digits <- c(0,rep(2, ncol(x)))
### aov objects
-
xtable.aov <- function(x, caption = NULL, label = NULL, align = NULL,
digits = NULL, display = NULL, auto = FALSE, ...) {
return(xtable.anova(anova(x, ...), caption = caption, label = label,
### lm objects
-
xtable.lm <- function(x, caption = NULL, label = NULL, align = NULL,
digits = NULL, display = NULL, auto = FALSE, ...) {
return(xtable.summary.lm(summary(x), caption = caption, label = label,
### glm objects
-
xtable.glm <- function(x, caption = NULL, label = NULL, align = NULL,
digits = NULL, display = NULL, auto = FALSE, ...) {
return(xtable.summary.glm(summary(x), caption = caption,
### prcomp objects
-
xtable.prcomp <- function(x, caption = NULL, label = NULL, align = NULL,
digits = NULL, display = NULL, auto = FALSE, ...) {
x <- data.frame(x$rotation, check.names = FALSE)
}
-# Slightly modified version of xtable.coxph contributed on r-help by
-# Date: Wed, 2 Oct 2002 17:47:56 -0500 (CDT)
-# From: Jun Yan <jyan@stat.wisc.edu>
-# Subject: Re: [R] xtable for Cox model output
+### Slightly modified version of xtable.coxph contributed on r-help by
+### Date: Wed, 2 Oct 2002 17:47:56 -0500 (CDT)
+### From: Jun Yan <jyan@stat.wisc.edu>
+### Subject: Re: [R] xtable for Cox model output
xtable.coxph <- function (x, caption = NULL, label = NULL, align = NULL,
digits = NULL, display = NULL, auto = FALSE, ...)
{
digits = digits, display = display, auto = auto))
}
-# Additional method: xtable.ts
-# Contributed by David Mitchell (davidm@netspeed.com.au)
-# Date: July 2003
+### Additional method: xtable.ts
+### Contributed by David Mitchell (davidm@netspeed.com.au)
+### Date: July 2003
xtable.ts <- function(x, caption = NULL, label = NULL, align = NULL,
digits = NULL, display = NULL, auto = FALSE, ...) {
if (inherits(x, "ts") && !is.null(ncol(x))) {
- # COLNAMES <- paste(colnames(x));
+ ## COLNAMES <- paste(colnames(x));
tp.1 <- trunc(time(x))
tp.2 <- trunc(cycle(x))
day.abb <- c("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")
### 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,
+ 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,
+ 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,
+ return(xtable.summary.sarlm(summary(x), caption = caption, label = label,
align = align, digits = digits,
display = display, auto = auto, ...))
}
xtable.sarlm.pred <- function(x, ...) {
return(xtable(as.data.frame(x), ...))
}
-
+
### lagImpact objects
xtable.lagImpact <- function(x, ...) {
xtable(spdep:::lagImpactMat(x), ...)
### splm objects
xtable.splm <- function(x, caption = NULL, label = NULL, align = NULL,
digits = NULL, display = NULL, auto = FALSE, ...) {
- if (!requireNamespace("splm", quietly = TRUE)) {
- stop("Package splm is needed for this function to work.",
- call. = FALSE)
- }
return(xtable.summary.splm(summary(x), caption = caption, label = label,
align = align, digits = digits,
display = display, auto = auto))
xtable.summary.splm <- function(x, caption = NULL, label = NULL, align = NULL,
digits = NULL, display = NULL, auto = FALSE,
...) {
- if (!requireNamespace("splm", quietly = TRUE)) {
- stop("Package splm is needed for this function to work.",
- call. = FALSE)
- }
x <- data.frame(x$CoefTable, check.names = FALSE)
class(x) <- c("xtable","data.frame")