powered by
Dataframe and Tables Pretty Formatting
format_table(x, sep = " | ", header = "-", digits = 2, protect_integers = TRUE, missing = "", width = NULL)
A data frame.
Column separator.
Header separator. Can be NULL.
NULL
Number of significant digits.
Should integers be kept as integers (i.e., without decimals)?
Value by which NA values are replaced. By default, an empty string (i.e. "") is returned for NA.
NA
""
Minimum width of the returned string. If not NULL and width is larger than the string's length, leading whitespaces are added to the string.
width
A data frame in character format.
# NOT RUN { cat(format_table(iris)) cat(format_table(iris, sep = " ", header = "*", digits = 1)) # }
Run the code above in your browser using DataLab