Re: [R] separate and arrange outputs

From: ivan <i.petzev_at_gmail.com>
Date: Wed, 27 Apr 2011 10:27:43 +0200

Hi,

thank you very much.

On Tue, Apr 26, 2011 at 10:06 PM, Jerome Asselin < jerome.asselin.stat_at_gmail.com> wrote:

> 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.
>
> Example:
>
> a <- list(a=2, b=c(2,2,2))
> class(a) <- "myclass"
> print.myclass <- function(x)
> {
> print(x[[1]])
> cat("***********\n")
> print(x[[2]])
> }
>
> This yields:
>
> > a
> [1] 2
> ***********
> [1] 2 2 2
>
> HTH,
>
> Jerome
>
>

        [[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 Wed 27 Apr 2011 - 08:31:32 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 - 08:40:33 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