\alias{xdigits}
\alias{xdisplay}
\title{Suggest Appropriate Formatting}
-\description{
+\description{
Suggest an appropriate \code{xtable} alignment, appropriate number of
digits, or display type for a vector, or each column of a matrix or
data frame.
\arguments{
\item{x}{a vector, matrix, or data frame.}
\item{pad}{when \code{x} is two-dimensional, \code{pad = TRUE} inserts
- an extra \code{"l"} for the row names.}
+ an extra code for the row names: \code{"l"} alignment , \code{0}
+ digits, and \code{"s"} display.}
\item{zap}{the number of digits passed to \code{zapsmall}.}
-
}
\value{
A character or a vector of characters, specifying the suggested
- alignment, number of digits or display type.
+ alignment, number of digits, or display type.
}
\author{Arni Magnusson.}
\seealso{
xalign(mtcars, pad = FALSE)
xalign(mtcars, pad = TRUE)
xtable(mtcars, align = xalign(mtcars))
+
xdigits(mtcars, pad = FALSE)
xdigits(mtcars, pad = TRUE)
xtable(mtcars, digits = xdigits(mtcars))
+
xdisplay(mtcars, pad = FALSE)
xdisplay(mtcars, pad = TRUE)
xtable(mtcars, display = xdisplay(mtcars))
\code{xtable} for a description of the options.
}
\author{David Dahl \email{dahl@stat.byu.edu} with contributions and suggestions from many others (see source code).}
-\seealso{\code{\link{xtable}}, \code{\link{print.xtable}}, \code{\link{formatC}}}
+\seealso{
+ \code{\link{xtable}}, \code{\link{print.xtable}},
+ \code{\link{xalign}}, \code{\link{xdigits}}, \code{\link{xdisplay}}
+}
\keyword{print}