format_col: Format a vector using styles

Description Usage Arguments

View source: R/styles.R

Description

Format a vector (data frame column) aligning, rounding the numbers and adding color.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
format_col(
  x,
  col_name = NULL,
  style = NULL,
  df_style = NULL,
  format = TRUE,
  col_width = NULL,
  prefix = " ",
  min.width = 5L,
  max.width = NULL
)

Arguments

x

a vector

col_name

optional: a column name (see Details)

style

A list with style definition

df_style

style for the whole data frame

format

Whether the vector should be formatted and aligned

col_width

optional: width to which elements of the vector should be aligned

prefix

prefix (column separator) to add to each element of x

min.width

minimum width of a column

max.width

maximum width of a column


colorDF documentation built on Nov. 16, 2020, 9:15 a.m.