the character vector that is returned invisibly.}\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
+ \code{format.args=list(big.mark = "'", decimal.mark =\r
+ ","))}. \code{digits} and \code{format} arguments should not be\r
+ included in this list. See details. }\r
\item{rotate.rownames}{If \code{TRUE}, the row names are displayed\r
vertically in LaTeX. }\r
\item{rotate.colnames}{If \code{TRUE}, the column names are displayed\r
From version 1.6-1 the default values for the arguments other than\r
\code{x} are obtainined using \code{getOption()}. Hence the user can\r
set the values once with \code{options()} rather than setting them in\r
- every call to \code{print.xtable()}. \r
+ every call to \code{print.xtable()}.\r
+\r
+ The argument \code{format.args} is used to supply arguments to the\r
+ \code{formatC} function, but will throw an error if values for\r
+ \code{digits} or \code{format} are included in the list of\r
+ arguments. The recommended approach is to specify \code{digits} supply\r
+ the argument \code{digits} to \code{xtable}, and to specify\r
+ \code{format} supply the argument \code{display} to \code{xtable}. See\r
+ the examples. \r
}\r
\author{\r
David Dahl \email{dahl@stat.tamu.edu} with contributions and\r
\code{\link{formatC}} \r
}\r
\r
+\examples{\r
+df <- data.frame(A = c(1.00123, 33.1, 6),\r
+ B = c(111111, 3333333, 3123.233))\r
+## The following code gives the error\r
+## formal argument "digits" matched by multiple actual arguments\r
+## print(xtable(df, display = c("s","e","e")),\r
+## format.args = list(digits = 3, big.mark = " ", decimal.mark = ","))\r
+## specify digits as argument to xtable instead\r
+print(xtable(df, display = c("s","f","f"), digits = 4),\r
+ format.args = list(big.mark = " ", decimal.mark = ","))\r
+## The following code gives the error\r
+## formal argument "format" matched by multiple actual arguments\r
+## print(xtable(df, digits = 4),\r
+## format.args = list(format = c("s","e","e"),\r
+## big.mark = " ", decimal.mark = ","))\r
+## specify format using display argument in xtable\r
+print(xtable(df, display = c("s","e","e"), digits = 4),\r
+ format.args = list(big.mark = " ", decimal.mark = ","))\r
+\r
+}\r
+\r
\keyword{print}\r