Skip to content
Prev 67896 / 398506 Next

how to use sink.number()

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)

thanks
Michael