]> git.donarmstrong.com Git - xtable.git/commitdiff
Added documentation of xtableList and print.xtableList. Other minor changes.
authordscott <dscott@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Wed, 27 Jan 2016 12:04:32 +0000 (12:04 +0000)
committerdscott <dscott@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Wed, 27 Jan 2016 12:04:32 +0000 (12:04 +0000)
git-svn-id: svn://scm.r-forge.r-project.org/svnroot/xtable@102 edb9625f-4e0d-4859-8d74-9fd3b1da38cb

pkg/R/xtableFtable.R
pkg/R/xtableList.R
pkg/man/print.xtable.Rd
pkg/man/xtable-internal.Rd
pkg/man/xtable.Rd
pkg/man/xtableFtable.Rd
pkg/man/xtableList.Rd [new file with mode: 0644]
pkg/vignettes/xtableGallery.Rnw

index 41870042cae3521a898d6ca396d15e135e88af88..c4e036963be2ff5e16fdc2c8838dcbc74f61b4db 100644 (file)
@@ -5,7 +5,7 @@ xtableFtable <- function(x, caption = NULL, label = NULL, align = NULL,
                          quote = FALSE,
                          method = c("non.compact", "row.compact",
                                     "col.compact", "compact"),
-                         lsep = " | ", ...) {
+                         lsep = " $\\vert$ ", ...) {
   method <- match.arg(method)
   saveMethod <- method
   xDim <- dim(x)
@@ -78,7 +78,8 @@ print.xtableFtable <- function(x,
   NA.string = getOption("xtable.NA.string", ""),
   only.contents = getOption("xtable.only.contents", FALSE),
   add.to.row = getOption("xtable.add.to.row", NULL),
-  sanitize.text.function = getOption("xtable.sanitize.text.function", NULL),
+  sanitize.text.function = getOption("xtable.sanitize.text.function",
+                                     function(x){x}),
   sanitize.rownames.function = getOption("xtable.sanitize.rownames.function",
                                          sanitize.text.function),
   sanitize.colnames.function = getOption("xtable.sanitize.colnames.function",
@@ -137,7 +138,7 @@ print.xtableFtable <- function(x,
     } else {
       fmtFtbl[1:nColVars, nCharCols - 1] <-
         sanitize.colnames.function(fmtFtbl[1:nColVars, nCharCols - 1])
-    }    
+    }
     ## rotations are possible
     if (rotate.rownames){
       fmtFtbl[1:dim(fmtFtbl)[1], 1:(nCharCols - 1)] <-
index 775d5c75ab24ef25bb5b11fa2cd3597fa1810a9f..9c7a602fc58c2fab2f1a7cf1da52fbb166c438c4 100644 (file)
@@ -46,7 +46,7 @@ print.xtableList <- function(x,
   hline.after = NULL,\r
   NA.string = getOption("xtable.NA.string", ""),\r
   include.rownames = getOption("xtable.include.rownames", TRUE),\r
-  include.colnames = getOption("xtable.include.colnames", TRUE),\r
+  colnames.format = "single",\r
   only.contents = getOption("xtable.only.contents", FALSE),\r
   add.to.row = NULL,\r
   sanitize.text.function = getOption("xtable.sanitize.text.function", NULL),\r
@@ -72,7 +72,6 @@ print.xtableList <- function(x,
   width = getOption("xtable.width", NULL),\r
   comment = getOption("xtable.comment", TRUE),\r
   timestamp = getOption("xtable.timestamp", date()),\r
-  colnames.format = "single",\r
   ...)\r
 {\r
   ## Get number of rows for each table in list of tables\r
@@ -103,14 +102,14 @@ print.xtableList <- function(x,
       xMessage <- attr(x, 'message')\r
       xMessage <- sapply(xMessage, sanitize.message.function)\r
       attr(x, 'message') <- xMessage\r
-    }    \r
+    }\r
     if (colnames.format == "single"){\r
\r
+\r
       add.to.row <- list(pos = NULL, command = NULL)\r
       add.to.row$pos <- as.list(c(0, combinedRowNums[-length(x)],\r
                                   dim(combined)[1]))\r
       command <- sapply(x, attr, "subheading")\r
-      \r
+\r
       add.to.row$command[1:length(x)] <-\r
         paste0(mRule,"\n\\multicolumn{", nCols, "}{l}{", command, "}\\\\\n")\r
       if ( (booktabs) & length(attr(x, "message") > 0) ){\r
@@ -123,7 +122,7 @@ print.xtableList <- function(x,
                collapse = "")\r
       add.to.row$command[length(x) + 1] <-\r
         paste0(bRule, add.to.row$command[length(x) + 1])\r
-      \r
+\r
       class(combined) <- c("xtableList", "data.frame")\r
       hline.after <- c(-1)\r
       include.colnames <- TRUE\r
@@ -166,13 +165,13 @@ print.xtableList <- function(x,
                collapse = "")\r
       add.to.row$command[length(x) + 1] <-\r
         paste0(bRule, add.to.row$command[length(x) + 1])\r
-      \r
+\r
       class(combined) <- c("xtableList", "data.frame")\r
       hline.after <- NULL\r
-      \r
+\r
       include.colnames <- FALSE\r
     }\r
-    \r
+\r
     print.xtable(combined,\r
                  type = type,\r
                  floating = floating,\r
index c8ca65494056f4f580de933004414c0b3b428fe3..ce44b4dfe323b3a0a8e57099384c265df2d6c207 100644 (file)
     The default uses the \code{sanitize.text.function}. }\r
   \item{math.style.negative}{In a LaTeX table, if \code{TRUE}, then use\r
     $-$ for the negative sign (as was the behavior prior to version 1.5-3).\r
-    Default value is \code{FALSE}.}  \r
+    Default value is \code{FALSE}.}\r
   \item{math.style.exponents}{In a LaTeX table, if \code{TRUE} or\r
     \code{"$$"}, then use \verb{$5 \times 10^{5}$} for 5e5. If\r
     \code{"ensuremath"}, then use \verb{\\ensuremath{5 \times 10^{5}}}\r
   \item{comment}{If \code{TRUE}, the version and timestamp comment is\r
     included.  Default value is \code{TRUE}. }\r
   \item{timestamp}{Timestamp to include in LaTeX comment.  Set this\r
-    to \code{NULL} to exclude the timestamp. Default value is \code{date()}. }\r
+    to \code{NULL} to exclude the timestamp. Default value is\r
+    \code{date()}. }\r
   \item{...}{Additional arguments.  (Currently ignored.) }\r
 }\r
 \details{\r
index 0e9b33722ad048bac8483e5aed38cc51ffade193..afd47283ea38aab6c1195ee48c757dd10ebd0c82 100644 (file)
@@ -1,6 +1,4 @@
 \name{xtable-internal}\r
-\alias{xtableList}\r
-\alias{print.xtableList}\r
 \alias{xtableLSMeans}\r
 \r
 \title{Internal xtable Functions}\r
index f632573b00c3aad659b49744ffebd2504262d3f5..29efa7c0f9d22bc1046b5647b3677784930b8758 100644 (file)
@@ -36,7 +36,7 @@
 
 \title{Create Export Tables}
 \description{
-  Convert an R object to an \code{xtable} object, which can
+  Convert an \R object to an \code{xtable} object, which can
   then be printed as a LaTeX or HTML table.
 }
 \usage{
@@ -44,7 +44,7 @@ xtable(x, caption = NULL, label = NULL, align = NULL, digits = NULL,
        display = NULL, auto = FALSE, ...)
 }
 \arguments{
-  \item{x}{An R object of class found among \code{methods(xtable)}.  See
+  \item{x}{An \R object of class found among \code{methods(xtable)}.  See
     below on how to write additional method functions for \code{xtable}.}
   \item{caption}{Character vector of length 1 or 2 containing the
     table's caption or title.  If length is 2, the second item is the
index 69c4a98f96fe8ad3010c1751cda286995420c5da..6e783a72502af6bf6a5a144dc137b195e577b997 100644 (file)
@@ -17,7 +17,7 @@ xtableFtable(x, caption = NULL, label = NULL,
              quote = FALSE,
              method = c("non.compact", "row.compact",
                          "col.compact", "compact"),
-             lsep = " | ", ...)
+             lsep = " $\\\\vert$ ", ...)
 
 \method{print}{xtableFtable}(x,
   type = getOption("xtable.type", "latex"),
@@ -35,7 +35,8 @@ xtableFtable(x, caption = NULL, label = NULL,
   NA.string = getOption("xtable.NA.string", ""),
   only.contents = getOption("xtable.only.contents", FALSE),
   add.to.row = getOption("xtable.add.to.row", NULL),
-  sanitize.text.function = getOption("xtable.sanitize.text.function", NULL),
+  sanitize.text.function = getOption("xtable.sanitize.text.function",
+                                     function(x){x}),
   sanitize.rownames.function = getOption("xtable.sanitize.rownames.function",
                                          sanitize.text.function),
   sanitize.colnames.function = getOption("xtable.sanitize.colnames.function",
@@ -81,7 +82,7 @@ xtableFtable(x, caption = NULL, label = NULL,
     denote left, right, and center alignment, respectively.  Use
     \code{"p{3cm}"} etc. for a LaTeX column of the specified width. For
     HTML output the \code{"p"} alignment is interpreted as \code{"l"},
-    ignoring the width request.   
+    ignoring the width request.
     If \code{NULL} all row variable labels will be left aligned,
     separated from the data columns by a vertical line, and all data
     columns will be right aligned. The actual length of \code{align}
@@ -113,10 +114,10 @@ xtableFtable(x, caption = NULL, label = NULL,
   \item{quote}{a character string giving the set of quoting characters
     for \code{format.ftable} used in \code{print.xtableFtable}; to
     disable quoting altogether, use \code{quote=""}.}
-  
+
   \item{method}{string specifying how the \code{"xtableFtable"} object is
     printed in the \code{print} method.  Can be abbreviated.  Available
-    methods are (see the examples in \code{\link{print.ftable}}):   
+    methods are (see the examples in \code{\link{print.ftable}}):
     \describe{
       \item{"non.compact"}{the default representation of an
         \code{"ftable"} object.}
@@ -181,7 +182,7 @@ xtableFtable(x, caption = NULL, label = NULL,
     tabular environment starts. This can be used to set the font size
     and a variety of other table settings. Initial backslashes are
     automatically prefixed, if not supplied by user.
-    Default value is \code{NULL}. } 
+    Default value is \code{NULL}. }
   \item{hline.after}{When \code{type="latex"}, a vector of numbers
     between -1 and \code{nrow(x)}, inclusive, indicating the rows after
     which a horizontal line should appear.  Repeated values are
@@ -217,7 +218,7 @@ xtableFtable(x, caption = NULL, label = NULL,
     The default uses the \code{sanitize.text.function}. }
   \item{math.style.negative}{In a LaTeX table, if \code{TRUE}, then use
     $-$ for the negative sign (as was the behavior prior to version 1.5-3).
-    Default value is \code{FALSE}.}  
+    Default value is \code{FALSE}.}
   \item{math.style.exponents}{In a LaTeX table, if \code{TRUE} or
     \code{"$$"}, then use \verb{$5 \times 10^{5}$} for 5e5. If
     \code{"ensuremath"}, then use \verb{\\ensuremath{5 \times 10^{5}}}
@@ -238,7 +239,7 @@ xtableFtable(x, caption = NULL, label = NULL,
     included in this list.
     Default value is \code{NULL}.}
   \item{rotate.rownames}{If \code{TRUE}, the row names and labels, and
-    column variable names are displayed vertically in LaTeX.    
+    column variable names are displayed vertically in LaTeX.
     Default value is \code{FALSE}.}
   \item{rotate.colnames}{If \code{TRUE}, the column names and labels,
     and row variable names are displayed vertically in LaTeX.
@@ -260,7 +261,8 @@ xtableFtable(x, caption = NULL, label = NULL,
   \item{comment}{If \code{TRUE}, the version and timestamp comment is
     included.  Default value is \code{TRUE}. }
   \item{timestamp}{Timestamp to include in LaTeX comment.  Set this
-    to \code{NULL} to exclude the timestamp. Default value is \code{date()}. }
+    to \code{NULL} to exclude the timestamp. Default value is
+    \code{date()}. }
   \item{...}{Additional arguments.  (Currently ignored.) }
 }
 \details{
@@ -300,17 +302,21 @@ xtableFtable(x, caption = NULL, label = NULL,
 
   For \code{print.xtableFtable} a character string which will produce a
   formatted table when included in a LaTeX document.
-  
+
 }
 \references{
   Fairbairns, Robin (2005) \emph{Tables longer than a single page.} The
   UK List of TeX Frequently Asked Questions on the
-  Web. \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=longtab}  
+  Web. \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=longtab}
 }
 \author{
   David Scott \email{d.scott@auckland.ac.nz}.
 }
 \note{
+  The functions \code{xtableFtable} and \code{print.xtableFtable} are
+  new and their behaviour may change in the future based on user
+  experience and recommendations.
+
   It is not recommended that users change the values of \code{align},
   \code{digits} or \code{align}. First of all, alternative values have
   not been tested. Secondly, it is most likely that to determine
diff --git a/pkg/man/xtableList.Rd b/pkg/man/xtableList.Rd
new file mode 100644 (file)
index 0000000..ce66636
--- /dev/null
@@ -0,0 +1,276 @@
+\name{xtableList}\r
+\alias{xtableList}\r
+\alias{print.xtableList}\r
+\r
+\title{\r
+  Create and Export Lists of Tables\r
+}\r
+\description{\r
+  \code{xtableList} creates an object which contains information about\r
+  lists of table which can be used by \code{print.xtableList} to produce\r
+  a character string which when included in a document produces a nicely\r
+  formatted table made up of the information in the individual tables\r
+  which comprised the original list of tables.\r
+}\r
+\usage{\r
+xtableList(x, caption = NULL, label = NULL,\r
+           align = NULL, digits = NULL, display = NULL, ...)\r
+\r
+\method{print}{xtableList}(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
+  caption.width = getOption("xtable.caption.width", NULL),\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 = NULL,\r
+  NA.string = getOption("xtable.NA.string", ""),\r
+  include.rownames = getOption("xtable.include.rownames", TRUE),\r
+  colnames.format = "single",\r
+  only.contents = getOption("xtable.only.contents", FALSE),\r
+  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
+  sanitize.subheadings.function =\r
+    getOption("xtable.sanitize.subheadings.function",\r
+              sanitize.text.function),\r
+  sanitize.message.function =\r
+    getOption("xtable.sanitize.message.function",\r
+              sanitize.text.function),\r
+  math.style.negative = getOption("xtable.math.style.negative", FALSE),\r
+  math.style.exponents = getOption("xtable.math.style.exponents", 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
+  rotate.rownames = getOption("xtable.rotate.rownames", FALSE),\r
+  rotate.colnames = getOption("xtable.rotate.colnames", FALSE),\r
+  booktabs = getOption("xtable.booktabs", FALSE),\r
+  scalebox = getOption("xtable.scalebox", NULL),\r
+  width = getOption("xtable.width", NULL),\r
+  comment = getOption("xtable.comment", TRUE),\r
+  timestamp = getOption("xtable.timestamp", date()),\r
+  ...)\r
+}\r
+\arguments{\r
+  \item{x}{For \code{xtableList}, a list of \R objects all of the same\r
+    class, being a class found among \code{methods(xtable)}.\r
+    For \code{print.xtableList}, an object of class \code{xtableList}\r
+    produced by a call to \code{xtableList}.}\r
+  \item{caption}{Character vector of length 1 or 2 containing the\r
+    table's caption or title.  If length is 2, the second item is the\r
+    "short caption" used when LaTeX generates a "List of Tables". Set to\r
+    \code{NULL} to suppress the caption.  Default value is \code{NULL}. }\r
+  \item{label}{Character vector of length 1 containing the LaTeX label\r
+    or HTML anchor. Set to \code{NULL} to suppress the label.  Default\r
+    value is \code{NULL}. }\r
+  \item{align}{Character vector of length equal to the number of columns\r
+    of the resulting table, indicating the alignment of the corresponding\r
+    columns.  Also, \code{"|"} may be used to produce vertical lines\r
+    between columns in LaTeX tables, but these are effectively ignored\r
+    when considering the required length of the supplied vector.  If a\r
+    character vector of length one is supplied, it is split as\r
+    \code{strsplit(align, "")[[1]]} before processing. Since the row\r
+    names are printed in the first column, the length of \code{align} is\r
+    one greater than \code{ncol(x)} if \code{x} is a\r
+    \code{data.frame}. Use \code{"l"}, \code{"r"}, and \code{"c"} to\r
+    denote left, right, and center alignment, respectively.  Use\r
+    \code{"p{3cm}"} etc. for a LaTeX column of the specified width. For\r
+    HTML output the \code{"p"} alignment is interpreted as \code{"l"},\r
+    ignoring the width request. Default depends on the class of\r
+    \code{x}. }\r
+  \item{digits}{\r
+    Either \code{NULL}, or a vector of length one, or a vector of length\r
+    equal to the number of columns in the resulting table, indicating\r
+    the number of digits to display in the corresponding columns, or a\r
+    list if length equal to the number of R objects making up \code{x},\r
+    all members being vectors of the same length, either length one or\r
+    of length equal to the number of columns in the resulting table. See\r
+    \sQuote{Details} for further information.}\r
+  \item{display}{\r
+    Either \code{NULL}, or a vector of length one, or a vector of length\r
+    equal to the number of columns in the resulting table, indicating\r
+    the format of the corresponding columns, or a\r
+    list if length equal to the number of R objects making up \code{x},\r
+    all members being vectors of the same length, either length one or\r
+    of length equal to the number of columns in the resulting table. See\r
+    \sQuote{Details} for further information.}\r
+  \item{type}{Type of table to produce. Possible values for \code{type}\r
+    are \code{"latex"} or \code{"html"}.\r
+    Default value is \code{"latex"}.}\r
+  \item{file}{Name of file where the resulting code should be saved.  If\r
+    \code{file=""}, output is displayed on screen.  Note that the\r
+    function also (invisibly) returns a character vector of the results\r
+    (which can be helpful for post-processing).\r
+    Default value is \code{""}.}\r
+  \item{append}{If \code{TRUE} and \code{file!=""}, code will be\r
+    appended to \code{file} instead of overwriting \code{file}.\r
+    Default value is \code{FALSE}.}\r
+  \item{floating}{If \code{TRUE} and \code{type="latex"}, the resulting\r
+    table will be a floating table (using, for example,\r
+    \code{\\begin\{table\}} and \code{\\end\{table\}}).  See\r
+    \code{floating.environment} below.\r
+    Default value is \code{TRUE}. }\r
+  \item{floating.environment}{If \code{floating=TRUE} and\r
+    \code{type="latex"}, the resulting table uses the specified floating\r
+    environment. Possible values include \code{"table"}, \code{"table*"},\r
+    and other floating environments defined in LaTeX packages.\r
+    Default value is \code{"table"}.}\r
+  \item{table.placement}{If \code{floating=TRUE} and\r
+    \code{type="latex"}, the floating table will have placement given by\r
+    \code{table.placement} where \code{table.placement} must be\r
+    \code{NULL} or contain only elements of\r
+    \{"h","t","b","p","!","H"\}.\r
+    Default value is \code{"ht"}.}\r
+  \item{caption.placement}{The caption will be placed at the bottom\r
+    of the table if \code{caption.placement} is \code{"bottom"} and at\r
+    the top of the table if it equals \code{"top"}.\r
+    Default value is \code{"bottom"}.}\r
+  \item{caption.width}{The caption will be placed in a \code{"parbox"}\r
+    of the specified width if \code{caption.width} is not \code{NULL} and\r
+       \code{type="latex"}. Default value is \code{NULL}.}\r
+  \item{latex.environments}{If \code{floating=TRUE} and\r
+    \code{type="latex"}, the specified LaTeX environments (provided as\r
+    a character vector) will enclose the tabular environment.\r
+    Default value is \code{"center"}. }\r
+  \item{tabular.environment}{When \code{type="latex"}, the tabular\r
+    environment that will be used.\r
+    When working with tables that extend more than one page, using\r
+    \code{tabular.environment="longtable"} with the corresponding\r
+    LaTeX package (see Fairbairns, 2005) allows one to typeset them\r
+    uniformly. Note that \code{floating} should be set to\r
+    \code{FALSE} when using the \code{longtable} environment.\r
+    Default value is \code{"tabular"}.}\r
+  \item{size}{A character vector that is inserted just before the\r
+    tabular environment starts. This can be used to set the font size\r
+    and a variety of other table settings. Initial backslashes are\r
+    automatically prefixed, if not supplied by user.\r
+    Default value is \code{NULL}. }\r
+  \item{hline.after}{When \code{type="latex"}, a vector of numbers\r
+    between -1 and the number of rows in the resulting table, inclusive,\r
+    indicating the rows after which a horizontal line should\r
+    appear. Determining row numbers is not straightforward since some\r
+    lines in the resulting table don't enter into the count.  The\r
+    default depends on the value of \code{col.names.format}.}\r
+  \item{NA.string}{String to be used for missing values in table\r
+    entries.\r
+    Default value is \code{""}.}\r
+  \item{include.rownames}{If \code{TRUE} the rows names are\r
+    printed.\r
+    Default value is \code{TRUE}.}\r
+  \item{colnames.format}{Either \code{"single"} or \code{"multiple"}.\r
+    Default is \code{"single"}.}\r
+  \item{only.contents}{If \code{TRUE} only the rows of the\r
+    table are printed.\r
+    Default value is \code{FALSE}. }\r
+  \item{add.to.row}{A list of two components. The first component (which\r
+    should be called 'pos') is a list that contains the position of rows on\r
+    which extra commands should be added at the end. The second\r
+    component (which should be called 'command') is a character vector\r
+    of the same length as the first component, which contains the command\r
+    that should be added at the end of the specified rows.\r
+    Default value is \code{NULL}, i.e. do not add commands.}\r
+  \item{sanitize.text.function}{All non-numeric entries (except row and\r
+    column names) are sanitized in an attempt to remove characters which\r
+    have special meaning for the output format. If\r
+    \code{sanitize.text.function} is not \code{NULL}, it should\r
+    be a function taking a character vector and returning one, and will\r
+    be used for the sanitization instead of the default internal\r
+    function.\r
+    Default value is \code{NULL}.}\r
+  \item{sanitize.rownames.function}{Like the\r
+    \code{sanitize.text.function}, but applicable to row names.\r
+    The default uses the \code{sanitize.text.function}. }\r
+  \item{sanitize.colnames.function}{Like the\r
+    \code{sanitize.text.function}, but applicable to column names.\r
+    The default uses the \code{sanitize.text.function}. }\r
+  \item{sanitize.subheadings.function}{Like the\r
+    \code{sanitize.text.function}, but applicable to subheadings.\r
+    The default uses the \code{sanitize.text.function}. }\r
+  \item{sanitize.message.function}{Like the\r
+    \code{sanitize.text.function}, but applicable to the message.\r
+    The default uses the \code{sanitize.text.function}. }\r
+  \item{math.style.negative}{In a LaTeX table, if \code{TRUE}, then use\r
+    $-$ for the negative sign (as was the behavior prior to version 1.5-3).\r
+    Default value is \code{FALSE}.}\r
+  \item{math.style.exponents}{In a LaTeX table, if \code{TRUE} or\r
+    \code{"$$"}, then use \verb{$5 \times 10^{5}$} for 5e5. If\r
+    \code{"ensuremath"}, then use \verb{\\ensuremath{5 \times 10^{5}}}\r
+    for 5e5. If \code{"UTF-8"} or \code{"UTF-8"}, then use UTF-8 to\r
+    approximate the LaTeX typsetting for 5e5.\r
+    Default value is \code{FALSE}.}\r
+  \item{html.table.attributes}{In an HTML table, attributes associated\r
+    with the \code{<TABLE>} tag.\r
+    Default value is \code{"border=1"}.}\r
+  \item{print.results}{If \code{TRUE}, the generated table is printed to\r
+    standard output.  Set this to \code{FALSE} if you will just be using\r
+    the character vector that is returned invisibly.\r
+  Default value is \code{TRUE}.}\r
+  \item{format.args}{List of arguments for the \code{formatC} function.\r
+    For example, standard German number separators can be specified as\r
+    \code{format.args=list(big.mark = "'", decimal.mark =\r
+      ","))}. The arguments \code{digits} and \code{format} should not be\r
+    included in this list. See details.\r
+    Default value is \code{NULL}.}\r
+  \item{rotate.rownames}{If \code{TRUE}, the row names are displayed\r
+    vertically in LaTeX.\r
+    Default value is \code{FALSE}.}\r
+  \item{rotate.colnames}{If \code{TRUE}, the column names are displayed\r
+    vertically in LaTeX.\r
+    Default value is \code{FALSE}.}\r
+  \item{booktabs}{If \code{TRUE}, the \code{toprule}, \code{midrule} and\r
+    \code{bottomrule} commands from the LaTeX "booktabs" package are used\r
+    rather than \code{hline} for the horizontal line tags. }\r
+  \item{scalebox}{If not \code{NULL}, a \code{scalebox} clause will be\r
+    added around the tabular environment with the specified value used\r
+    as the scaling factor.\r
+    Default value is \code{NULL}.}\r
+  \item{width}{If not \code{NULL}, the specified value is included in\r
+    parentheses between the tabular environment \code{begin} tag and the\r
+    alignment specification.  This allows specification of the table\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
+    Default value is \code{NULL}.}\r
+  \item{comment}{If \code{TRUE}, the version and timestamp comment is\r
+    included.  Default value is \code{TRUE}. }\r
+  \item{timestamp}{Timestamp to include in LaTeX comment.  Set this\r
+    to \code{NULL} to exclude the timestamp. Default value is\r
+    \code{date()}. }\r
+  \item{\dots}{Additional arguments.  (Currently ignored.)}\r
+}\r
+\details{\r
+%%  ~~ If necessary, more details than the description above ~~\r
+}\r
+\value{\r
+%%  ~Describe the value returned\r
+%%  If it is a LIST, use\r
+%%  \item{comp1 }{Description of 'comp1'}\r
+%%  \item{comp2 }{Description of 'comp2'}\r
+%% ...\r
+}\r
+\author{\r
+  David Scott \email{d.scott@auckland.ac.nz}.\r
+}\r
+\note{\r
+  The functions \code{xtableList} and \code{print.xtableList} are\r
+  new and their behaviour may change in the future based on user\r
+  experience and recommendations.\r
+}\r
+\r
+\r
+\seealso{\r
+  \code{\link{xtable}}, \code{\link{caption}}, \code{\link{label}},\r
+  \code{\link{align}}, \code{\link{digits}}, \code{\link{display}},\r
+  \code{\link{formatC}}\r
+}\r
+\examples{\r
+}\r
+\keyword{ print }\r
index 14dbd6f72d2904734cb12a8fc8cf62f87086ccb1..bb41fab3c3c7768a08fd3509ec81e8c9eaa2c3c5 100644 (file)
@@ -194,13 +194,11 @@ print.xtableFtable(xftbl, rotate.rownames = TRUE)
 @ %def\r
 \r
 Booktabs is incompatible with vertical lines in tables, so the\r
-vertical dividing line is removed. The separator \code{lsep} may require special treatment.\r
+vertical dividing line is removed.\r
 \r
 <<ftable3, results = 'asis'>>=\r
-xftbl <- xtableFtable(tbl, method = "compact", lsep = " $\\vert$ ")\r
-sanitize.text.function <- function(x){x}\r
-print.xtableFtable(xftbl, sanitize.text.function = sanitize.text.function,\r
-                   booktabs = TRUE)\r
+xftbl <- xtableFtable(tbl, method = "compact")\r
+print.xtableFtable(xftbl, booktabs = TRUE)\r
 @ %def\r
 \p\r
 \r
@@ -227,8 +225,7 @@ tbl <- ftable(mtcars$cyl, mtcars$vs, mtcars$am, mtcars$gear,
               row.vars = c(2, 4),\r
               dnn = c("Cylinders", "V/S", "Transmission", "Gears"))\r
 xftbl <- xtableFtable(tbl, method = "row.compact")\r
-sanitize.text.function <- function(x){x}\r
-print.xtableFtable(xftbl, sanitize.text.function = sanitize.text.function,\r
+print.xtableFtable(xftbl,\r
                    sanitize.rownames.function = large,\r
                    sanitize.colnames.function = bold,\r
                    rotate.colnames = TRUE,\r