format
to produce a single
character string describing an R object.
toString(x, ...)
"toString"(x, width = NULL, ...)
NULL
or 0
indicate no maximum.
The minimum value accepted is 6 and smaller values are taken as 6.width
argument to specify the maximum display width (as measured
by nchar(type = "width")
of the result. The default method first converts x
to character and then
concatenates the elements separated by ", "
.
If width
is supplied and is not NULL
, the default method
returns the first width - 4
characters of the result with
....
appended, if the full result would use more than
width
characters.
format
x <- c("a", "b", "aaaaaaaaaaa")
toString(x)
toString(x, width = 8)
Run the code above in your browser using DataLab