Re: [R] how to use sink.number()

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon 18 Apr 2005 - 21:14:37 EST

On Mon, 18 Apr 2005, Michael S wrote:

> Dear All R-helper,
> my question is how to use sink.number.
> if I want to label the output was sinked by sink function how should I do ?
> example:
> zz <- file("c:\\sinktest1.txt",open="wt")
> sink(zz)
> g<- 1:10
> cat(g,"\n")
> f<-list(1:100)
> h<-capture.output(f)
> cat(h)
> sink()
>
> I want there are marks in "sinktest1.txt" files, let me know the number of
> output I get(in this example, there should be 2 mark or number ,becuase I
> using two cat function)

That is nothing to do with sink.number():

      'sink.number()' reports how many diversions are in use.

      'sink.number(type = "message")' reports the number of the
      connection currently being used for error messages.

If you don't understand that, please consult the references on the help page.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Mon Apr 18 21:18:39 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:15 EST