formatA function

A formating function for numbers

A formating function for numbers

Formats a vector or matrix of numbers so that all have equal length (digits). This is especially suitable for printing tables. UTF-8

formatA(x, digits = 2, FUN = round, ...)

Arguments

  • x: A numerical vector or matrix.
  • digits: The number of desired digits.
  • FUN: Function used for "shortening" the numbers.
  • ...: Additional arguments to format.

Returns

A character vector or matrix.

Examples

A <- matrix(c(1, 1.02002, 0.2, 10.3), ncol = 2) formatA(A)

See Also

find.m, find.m2, find.cut

Author(s)

  • Maintainer: Aleš Žiberna
  • License: GPL (>= 2)
  • Last published: 2023-08-23

Useful links