]> git.donarmstrong.com Git - xtable.git/commitdiff
Issue #2246: Add way to exclude timestamp.
authorroosen <roosen@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sun, 2 Sep 2012 11:18:41 +0000 (11:18 +0000)
committerroosen <roosen@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sun, 2 Sep 2012 11:18:41 +0000 (11:18 +0000)
git-svn-id: svn://scm.r-forge.r-project.org/svnroot/xtable@39 edb9625f-4e0d-4859-8d74-9fd3b1da38cb

pkg/R/print.xtable.R
pkg/man/print.xtable.Rd

index 2f875b0f54860634f4b54cfaa30f9b7f75f70499..c0cce93ef7f9a2a37050769bf1b71e3a141a4fc2 100644 (file)
@@ -52,6 +52,7 @@ print.xtable <- function(x,
   booktabs = getOption("xtable.booktabs", FALSE),\r
   scalebox = getOption("xtable.scalebox", NULL),\r
   width = getOption("xtable.width", NULL),\r
+  timestamp = date(),\r
   ...)\r
 {\r
     ## If caption is length 2, treat the second value as the "short caption"\r
@@ -439,7 +440,9 @@ print.xtable <- function(x,
               info$language + " " + info$major + "." + info$minor +\r
               " by xtable " +  packageDescription('xtable')$Version +\r
               " package" + ECOMMENT\r
-    result <- result + BCOMMENT + date() + ECOMMENT\r
+    if (!is.null(timestamp)){            \r
+        result <- result + BCOMMENT + timestamp + ECOMMENT\r
+    }          \r
     ## Claudio Agostinelli <claudio@unive.it> dated 2006-07-28 only.contents\r
     if (!only.contents) {\r
         result <- result + BTABLE\r
index 03e35897df63186447ccf082e8399d00f8490252..879543b10f6e13b8eeea83bd2cf63efb73b42802 100644 (file)
@@ -38,6 +38,7 @@
   booktabs = getOption("xtable.booktabs", FALSE),\r
   scalebox = getOption("xtable.scalebox", NULL),\r
   width = getOption("xtable.width", NULL),\r
+  timestamp = date(),\r
   ...)}\r
 \arguments{\r
   \item{x}{An object of class \code{"xtable"}.}\r
     width when using tabular environments such as \code{tabular*} and\r
     \code{tabularx}.  Note that table width specification is not\r
     supported with the \code{tabular} or \code{longtable} environments. }\r
+  \item{timestamp}{Timestamp to include in LaTeX comment.  Set this\r
+    to \code{NULL} to exclude the timestamp.}  \r
   \item{...}{Additional arguments.  (Currently ignored.)}\r
 }\r
 \details{\r