I'm not sure if the problem is in the documentation or in the function implementation.
Based on my reading of the documentation for cat(), I expected that using e.g.
the code cat(a, b, c, fill=70) would concatenate strings a, b and c, and
then split the resulting string into sub-strings of length <= 70 characters
and print one per line. Presumably the splitting would be done at word-boundaries, though this is not stated.
However, the actual behavior of cat(a, b, c, fill=70) is to only split
printed lines *between* the objects 'a', 'b', and 'c'. If each of the
strings 'a', 'b' and 'c' is longer than 70 characters, then the output
will have each of the strings on their own line and each line will (obviously)
be longer than 70 characters. If concatenation of some of the elements is
results in a string with fewer than 70 characters, this will be done and
they will appear on a single line. But no splitting of long strings will
So this behavior of cat() with 'fill' specified (as TRUE or positive integer)
is really only useful if you're passing it a bunch of short strings.
Perhaps this is obvious to whomever wrote the documentation, but it's not at all obvious to me when I read it.
Created attachment 2041 [details]
example R code to illustrate
Created attachment 2042 [details]
example code output