powered by
Formats a vector or matrix of numbers so that all have equal length (digits). This is especially suitable for printing tables.
formatA(x, digits = 2, FUN = round, ...)
A character vector or matrix.
A numerical vector or matrix.
The number of desired digits.
Function used for "shortening" the numbers.
Additional arguments to format.
format
Aleš Žiberna
find.m, find.m2, find.cut
find.m
find.m2
find.cut
A <- matrix(c(1, 1.02002, 0.2, 10.3), ncol = 2) formatA(A)
Run the code above in your browser using DataLab