Learn R Programming

diffdf (version 1.1.1)

as_fmt_char: Format vector to printable string

Description

Coerces a vector of any type into a printable string. The most significant transformation is performed on existing character vectors which will be truncated, have newlines converted to explicit symbols and will be wrapped in quotes if they contain white space.

Usage

as_fmt_char(x, ...)

# S3 method for numeric as_fmt_char(x, ...)

# S3 method for `NULL` as_fmt_char(x, ...)

# S3 method for list as_fmt_char(x, ...)

# S3 method for factor as_fmt_char(x, ...)

# S3 method for character as_fmt_char(x, add_quotes = TRUE, crop_at = 30, ...)

# S3 method for default as_fmt_char(x, ...)

# S3 method for POSIXt as_fmt_char(x, ...)

Arguments

x

(vector)
vector to be converted to character

...

additional arguments (not currently used)

add_quotes

(logical)
if true will wrap strings that contain whitespace with quotes

crop_at

(numeric)
specifies the limit at which strings should be truncated to