str_out(x, max = 3L, quote = is.character(x), use.names = FALSE, sep = ", ") str_desc(object, exdent = 0L) str_fun(object)
x
has more elements than max
, a
"..."
suffix is appended.NAME=VAL, ...
or
not (default).a single character string
str_out
formats character vectors for use in show
methods or error/warning messages.
str_desc
builds formatted string from a list of
complex values.
str_fun
extracts and formats a function signature.
It typically formats the output
capture.output(args(object))
.
x <- letters[1:10]str_out(x)[1] "'a', 'b', ..., 'j'"str_out(x, 8)[1] "'a', 'b', 'c', 'd', 'e', 'f', 'g', ..., 'j'"str_out(x, Inf)[1] "'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'"str_out(x, quote=FALSE)[1] "a, b, ..., j"str_fun(install.packages)[1] "function (pkgs, lib, repos = getOption(\"repos\"), contriburl = contrib.url(repos, \n type), method, available = NULL, destdir = NULL, dependencies = NA, \n type = getOption(\"pkgType\"), configure.args = getOption(\"configure.args\"), \n configure.vars = getOption(\"configure.vars\"), clean = FALSE, \n Ncpus = getOption(\"Ncpus\", 1L), verbose = getOption(\"verbose\"), \n libs_only = FALSE, INSTALL_opts, quiet = FALSE, keep_outputs = FALSE, \n ...) "