Re: [R] separate and arrange outputs

From: Jerome Asselin <>
Date: Tue, 26 Apr 2011 16:06:13 -0400

On Tue, 2011-04-26 at 19:46 +0200, ivan wrote:
> Hello,
> given that a self made function produces multiple outputs, is there a
> possibility to separate latter by stars or simply by blank lines? Are there
> funtions for the arrangement of the output in general?

You can create a class for your object and then write a "print" method.


a <- list(a=2, b=c(2,2,2))
class(a) <- "myclass"
print.myclass <- function(x)

This yields:

> a

[1] 2

[1] 2 2 2

HTH, Jerome mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 26 Apr 2011 - 20:08:38 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 Wed 27 Apr 2011 - 09:00:33 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive