Skip to content

Remove leading brackets in print?

3 messages · R A F, Marc Schwartz, Ko-Kang Kevin Wang

#
Hi, I can't seem to get an answer for this by searching through the
R-help archives:  How does one remove leading brackets in print?

For example,
Would it be possible to get rid of the "[1]"?

Of course the effect is the same without "print", as in,
but I would only be interested in omitting brackets in printing, if
that's possible.

Thanks very much!
#
Use cat() instead of print().

You will also generally need to append a newline character ("\n") to
the output, as I do below.

Thus, you would use:
3 

See ?cat for more information.

HTH,

Marc Schwartz
#
Something like:
3 

Is this what you are looking for?
On Tue, 29 Apr 2003, R A F wrote: