1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/formatA.R
\encoding{UTF-8}
\name{formatA}
\alias{formatA}
\title{A formating function for numbers}
\usage{
formatA(x, digits = 2, FUN = round, ...)
}
\arguments{
\item{x}{A numerical vector or matrix.}
\item{digits}{The number of desired digits.}
\item{FUN}{Function used for "shortening" the numbers.}
\item{\dots}{Additional arguments to \code{format}.}
}
\value{
A character vector or matrix.
}
\description{
Formats a vector or matrix of numbers so that all have equal length (digits). This is especially suitable for printing tables.
}
\examples{
A <- matrix(c(1, 1.02002, 0.2, 10.3), ncol = 2)
formatA(A)
}
\seealso{
\code{\link{find.m}}, \code{\link{find.m2}}, \code{\link{find.cut}}
}
\author{
\enc{Aleš Žiberna}{Ales Ziberna}
}
\keyword{character}
|