[R] Remove leading brackets in print?
mschwartz at medanalytics.com
Tue Apr 29 19:08:50 CEST 2003
>From: r-help-bounces at stat.math.ethz.ch
>[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of R A F
>Sent: Tuesday, April 29, 2003 11:42 AM
>To: r-help at stat.math.ethz.ch
>Cc: raf1729 at hotmail.com
>Subject: [R] Remove leading brackets in print?
>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?
>>print( 3 )
>Would it be possible to get rid of the ""?
>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:
> cat(3, "\n")
See ?cat for more information.
More information about the R-help