Re: [R] Eliminating "[...]" from print

From: LANGOHR, KLAUS <klangohr_at_imim.es>
Date: Mon, 02 Jun 2008 12:33:19 +0200


Ted,

You may also want to try the function report of the npmc package.

For example,  

report("Have a nice day!", style="underline", char="*")          

gives  

Have a nice day!


 

Regards,  

Klaus.    

Message: 16

Date: Sun, 01 Jun 2008 19:43:17 +0100 (BST)

From: (Ted Harding) <Ted.Harding_at_manchester.ac.uk>

Subject: Re: [R] Eliminating "[...]" from print

To: Matthias Kohl <Matthias.Kohl_at_stamats.de>

Cc: r-help_at_stat.math.ethz.ch

Message-ID: <XFMail.080601194317.Ted.Harding@manchester.ac.uk>

Content-Type: text/plain; charset=iso-8859-1  

Many thanks, Matthias! cat() did the job, exactly as wanted.

message() won't do, since sink() eother captures output

(type="output", the default) or captures messages

(type="message"), in which case it won't capture the ouput!

In any case, even if it captured both, I wouldn't want to

sin() all the other messages.  

Best wishes,

Ted.  

On 01-Jun-08 18:01:59, Matthias Kohl wrote:

> Dear Ted,

>

> what about

> cat("####################\n")

>

> or

>

> message("####################")

>

> Best,

> Matthias

>

> (Ted Harding) wrote:

>> Hi Folks,

>> This must be easy but I've not managed to locate the solution!

>>

>> Basically: I'm using sink() to save successively obtained

>> results, e.g. I construct a set of regression coefficients

>> etc. with names rows and columne (I want to see the names

>> in the output) as an object (say "Object"), and then I

>> emit it with

>>

>> print(Object)

>>

>> So far so good. But I also want to print a little header

>> and separator prior to each such print(Object) which would

>> identify it and explain what's going on. BUT: I can't get

>> rid of the "[1]" which comes out each time I print a

>> character string. Getting rid of the quotes is easy: just

>> use "quote=FALSE". For example:

>>

>> print ("############################",quote=FALSE)

>>

>> gives

>>

>> [1] ############################

>>

>> But how do I get rid of that "[1]"??

>>

>> With thanks,

>> Ted.

>>

>>

>> --------------------------------------------------------------------

>> E-Mail: (Ted Harding) <Ted.Harding@manchester.ac.uk>

>> Fax-to-email: +44 (0)870 094 0861

>> Date: 01-Jun-08 Time: 18:53:00

>> ------------------------------ XFMail ------------------------------

>>
   

Klaus Langohr

Statistician, PhD

Grup de Recerca Clínica en Farmacologia Humana i Neurocičncies.

Programa de Recerca en Neuropsicofarmacologia

IMIM-Hospital del Mar  

Barcelona Biomedical Research Park

Doctor Aiguader, 88 | 08003 Barcelona

Tel. +34/ 933 160 458 | Fax +34/ 933 160 467

klangohr_at_imim.es | www.imim.cat  

        [[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. Received on Mon 02 Jun 2008 - 10:38:59 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 02 Jun 2008 - 11:30:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive