[R] avoid row/column indexing in capture.output

From: Subodh Acharya <shoebodh_at_gmail.com>
Date: Mon, 14 Jun 2010 18:19:32 -0400


Hi everyone,
This might be a very petty thing but Its not working for me.
 I want to export an output to a txt file but without indexing. Here is what I have tried to do

outfile<- function(Time, var.names, output) {   var.names = c(names(para))
 for(i in 1: ncol(output)){

   cat(length(var.names), '\n')
   cat("A", "S", "C", "I", '\n')
   cat("time =", "yes", '\n')
   cat("RUN", i, '\n')
   cat(length(Time), '\n')

    print(cbind(Time, output[,i]))
 }
 }
This works fine and
I get the output like as follows

4
A S C I
time = yes
RUN 1
111

       [,1] [,2]
[1,] 0.00 1.7500000
[2,] 0.05 0.3983540
[3,] 0.10 0.6010150
[4,] 0.15 0.6759570
[5,] 0.20 0.7165215
[6,] 0.25 0.7423391
[7,] 0.30 0.7603594
[8,] 0.35 0.7737155
[9,] 0.40 0.7840432

 [10,] 0.45 0.7922850
.
.
But I need need to have an output like this 4
A S C I
time = yes
RUN 1
111

0.00 1.7500000
0.05 0.3983540
0.10 0.6010150
...


Any kind of help will be highly appreciated.

Thank you in advance

-- 
Acharya, Subodh

	[[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 Mon 14 Jun 2010 - 22:22:24 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 Mon 14 Jun 2010 - 23:00: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