cat(..., file=<<see below>>, sep=" ", fill=F, labels=NULL, append=F)
When fill is a positive number, a newline is placed before the first string that makes the present line exceed fill characters. If present, labels is cycled through. Each label is paired with a character string; so if there were only two labels and an even number of strings on each line, only the first label would be printed.
A special case occurs when only one string is given (i.e., one argument of length one) and fill = TRUE. In this case cat will break the string at any internal white space to avoid overrunning the width of the line. In other words, if you want to have your output broken at arbitrary white space, not just between items, first make the output into a single string (by the function paste, for example) and give that string to cat with fill = TRUE.
Also, cat will print each numeric value to as many digits as needed to represent it. You might want to use format to control the formatting of numeric values.
cat("current x:", x, fill=T) cat("Today's date is:",date(),"\n") cat(1,2,3,4,5,6, fill=4, labels=letters[1:6]) cat(rnorm(40), fill=T, labels=c("odd string first","even string first"))