[R] print with no array index

Marc Schwartz mschwartz at medanalytics.com
Sat Feb 15 17:55:27 CET 2003


>-----Original Message-----
>From: r-help-admin at stat.math.ethz.ch 
>[mailto:r-help-admin at stat.math.ethz.ch] On Behalf Of Hiroyuki
Kawakatsu
>Sent: Saturday, February 15, 2003 10:45 AM
>To: r-help at stat.math.ethz.ch
>Subject: [R] print with no array index
>
>
>hi,
>
>can someone tell me an easy way to print arrays interactively 
>without printing the array index? for example, instead of
>
>> print("foo",quote=FALSE)
>[1] foo
>
>i want
>
>foo
>
>thanks,
>h.

Look at ?cat

You will need to add a newline character "\n" to the vector.

For example:

> cat("foo\n")
foo
>

Regards,

Marc Schwartz




More information about the R-help mailing list