[R] Supressing the enumeration of output in console

Greg Snow Greg.Snow at imail.org
Wed May 20 21:08:33 CEST 2009


Use the 'cat' function to put text on the console without any extra decoration (you are then responsible for all formatting including line feeds).

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of ZeMajik
> Sent: Wednesday, May 20, 2009 1:04 PM
> To: r-help at r-project.org
> Subject: [R] Supressing the enumeration of output in console
> 
> Hi!
> Pretty low content question but I've had major trouble finding an
> answer for
> it so I hope it's alright.
> I'm obviously new to R, and have been trying to get rid of the
> numerated
> output I get in the console.
> 
> What I mean more specifically is that
> 
> X<-4;X
> 
> comes out as
> 
> [1] 4
> 
> and I'd like to get rid of the listing [1].
> 
> This isn't usually a problem when working with the console but when
> writing
> scripts that print out lines of text it gives a rather unattractive
> output
> in the console.
> 
> Thanks in advance!
> Mike
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list