From: roosen Date: Sun, 2 Sep 2012 11:18:41 +0000 (+0000) Subject: Issue #2246: Add way to exclude timestamp. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b8b8ae328fda6f8245d8130a0a2f0948db05154f;p=xtable.git Issue #2246: Add way to exclude timestamp. git-svn-id: svn://scm.r-forge.r-project.org/svnroot/xtable@39 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- diff --git a/pkg/R/print.xtable.R b/pkg/R/print.xtable.R index 2f875b0..c0cce93 100644 --- a/pkg/R/print.xtable.R +++ b/pkg/R/print.xtable.R @@ -52,6 +52,7 @@ print.xtable <- function(x, booktabs = getOption("xtable.booktabs", FALSE), scalebox = getOption("xtable.scalebox", NULL), width = getOption("xtable.width", NULL), + timestamp = date(), ...) { ## If caption is length 2, treat the second value as the "short caption" @@ -439,7 +440,9 @@ print.xtable <- function(x, info$language + " " + info$major + "." + info$minor + " by xtable " + packageDescription('xtable')$Version + " package" + ECOMMENT - result <- result + BCOMMENT + date() + ECOMMENT + if (!is.null(timestamp)){ + result <- result + BCOMMENT + timestamp + ECOMMENT + } ## Claudio Agostinelli dated 2006-07-28 only.contents if (!only.contents) { result <- result + BTABLE diff --git a/pkg/man/print.xtable.Rd b/pkg/man/print.xtable.Rd index 03e3589..879543b 100644 --- a/pkg/man/print.xtable.Rd +++ b/pkg/man/print.xtable.Rd @@ -38,6 +38,7 @@ booktabs = getOption("xtable.booktabs", FALSE), scalebox = getOption("xtable.scalebox", NULL), width = getOption("xtable.width", NULL), + timestamp = date(), ...)} \arguments{ \item{x}{An object of class \code{"xtable"}.} @@ -157,6 +158,8 @@ width when using tabular environments such as \code{tabular*} and \code{tabularx}. Note that table width specification is not supported with the \code{tabular} or \code{longtable} environments. } + \item{timestamp}{Timestamp to include in LaTeX comment. Set this + to \code{NULL} to exclude the timestamp.} \item{...}{Additional arguments. (Currently ignored.)} } \details{