]> git.donarmstrong.com Git - xtable.git/blobdiff - pkg/man/print.xtable.Rd
Submitting multiple changes as R-Forge SVN has been down. Added the use of getOption...
[xtable.git] / pkg / man / print.xtable.Rd
index 8c75a2541fb9959b6259527ac48c7647ab38a03d..62d05b13a05e3185c252b7016c8fce637db468c0 100644 (file)
@@ -3,24 +3,37 @@
 \title{Print Export Tables}\r
 \description{Function returning and displaying or writing to disk the LaTeX or HTML code associated with the supplied object of class \code{xtable}.}\r
 \usage{\r
-       \method{print}{xtable}(x, type="latex", file="", append=FALSE, \r
-    floating=TRUE, floating.environment="table", \r
-    table.placement = "ht", caption.placement="bottom", \r
-               latex.environments=c("center"),\r
-    tabular.environment = "tabular", size=NULL,\r
-               hline.after=c(-1,0,nrow(x)), NA.string = "", include.rownames=TRUE, \r
-               include.colnames=TRUE, only.contents=FALSE, add.to.row=NULL, \r
-               sanitize.text.function=NULL, \r
-    sanitize.rownames.function=sanitize.text.function,\r
-               sanitize.colnames.function=sanitize.text.function, \r
-    math.style.negative=FALSE, \r
-               html.table.attributes="border=1", \r
-               print.results=TRUE, \r
-    format.args=NULL, \r
-               short.caption=NULL, \r
-               rotate.rownames = FALSE,\r
-               rotate.colnames = FALSE,\r
-               ...)}\r
+\method{print}{xtable}(x, \r
+  type=getOption("xtable.type", "latex"),\r
+  file=getOption("xtable.file", ""),\r
+  append=getOption("xtable.append", FALSE),\r
+  floating=getOption("xtable.floating", TRUE),\r
+  floating.environment=getOption("xtable.floating.environment", "table"),\r
+  table.placement=getOption("xtable.table.placement", "ht"),\r
+  caption.placement=getOption("xtable.caption.placement", "bottom"),\r
+  latex.environments=getOption("xtable.latex.environments", c("center")),\r
+  tabular.environment=getOption("xtable.tabular.environment", "tabular"),\r
+  size=getOption("xtable.size", NULL),\r
+  hline.after=getOption("xtable.hline.after", c(-1,0,nrow(x))),\r
+  NA.string=getOption("xtable.NA.string", ""),\r
+  include.rownames=getOption("xtable.include.rownames", TRUE),\r
+  include.colnames=getOption("xtable.include.colnames", TRUE),\r
+  only.contents=getOption("xtable.only.contents", FALSE),\r
+  add.to.row=getOption("xtable.add.to.row", NULL),\r
+  sanitize.text.function=getOption("xtable.sanitize.text.function", NULL),\r
+  sanitize.rownames.function=getOption("xtable.sanitize.rownames.function", \r
+    sanitize.text.function),\r
+  sanitize.colnames.function=getOption("xtable.sanitize.colnames.function", \r
+    sanitize.text.function),\r
+  math.style.negative=getOption("xtable.math.style.negative", FALSE),\r
+  html.table.attributes=getOption("xtable.html.table.attributes", "border=1"),\r
+  print.results=getOption("xtable.print.results", TRUE),\r
+  format.args=getOption("xtable.format.args", NULL),\r
+  short.caption=getOption("xtable.short.caption", NULL),\r
+  rotate.rownames=getOption("xtable.rotate.rownames", FALSE),\r
+  rotate.colnames=getOption("xtable.rotate.colnames", FALSE),\r
+  booktabs = getOption("xtable.booktabs", FALSE),\r
+  ...)}\r
 \arguments{\r
   \item{x}{An object of class \code{"xtable"}.}\r
   \item{type}{Type of table to produce.  Possible values for \code{type} are \code{"latex"} or \code{"html"}.\r
@@ -58,6 +71,7 @@
   \item{short.caption}{A "short caption" can be specified that gets used as the table descriptor when LaTeX generates a "List of Tables".}\r
   \item{rotate.rownames}{If \code{TRUE}, the row names are displayed vertically in LaTeX.}\r
   \item{rotate.colnames}{If \code{TRUE}, the column names are displayed vertically in LaTeX.}\r
+  \item{booktabs}{If \code{TRUE}, the \code{toprule}, \code{midrule} and \code{bottomrule} tags from the LaTex "booktabs" package are used rather than \code{hline} for the horizontal line tags.}\r
   \item{...}{Additional arguments.  (Currently ignored.)}\r
 }\r
 \details{\r
@@ -69,6 +83,8 @@
 \r
   From version 1.4-3, all non-numeric columns are sanitized, and all LaTeX special characters are sanitised for LaTeX output.  See Section 3 of the \code{xtableGallery} vignette for an example of customising the sanitization.\r
   From version 1.4-4, the sanitization also applies to column names.  To remove any text sanitization, specify \code{sanitize.text.function=function(x){x}}.\r
+  \r
+  From version 1.6-1 the default values for the arguments other than \code{x} are obtainined using \code{getOption()}.  Hence the user can set the values once with \code{options()} rather than setting them in every call to \code{print.xtable()}.\r
 }\r
 \author{David Dahl \email{dahl@stat.tamu.edu} with contributions and suggestions from many others (see source code).}\r
 \references{\r