how to use sink.number()
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 at 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