Consider the string "Hello \n World!"
. It appears that the relevant methods for formatting and printing it are print.default
, cat
, and if need be, format
then print
or cat
. However, each of these seem to be able to do some things that the others cannot. Is there any one ultimate printing function that gives the maximum amount of control over the formatting/printing of my strings?
For example, I can't see anywhere in print
, format
, or print.default
's documentations that would make them respect my \n
and put a line break in "Hello \n World!"
, as cat
does, but I also can't see anyway to make cat
keep the quotation marks in "Hello \n World!"
, as print("Hello \n World!", quote=FALSE)
would.