[R] A problem on sink() and format,suggestions appreciated

From: Yong Wang <wang_at_galton.uchicago.edu>
Date: Wed 01 Jun 2005 - 15:04:29 EST

Dear R users
I get a weired problem when use sink:
since the data set pretty big, I sink intermediate result for further use,following
lines are consistently used when write data

###########################

sink("dataname.txt")
data
sink()
##########################

at first couples of run, all 10 variables are wrote to a file in following format:

 	V1  	   V2 	  .......  	V10
1	10457   132356.7  .......      4356.8
2       75690.2 66697     .......      98777

. ..................................
10000 654786 3412.54 ...... 98712.567

then I did modifcations somewhere else, the format change to:

 	V1  	   V2 	  .......  	V9
1	10457   132356.7  .......      7823.569
2       75690.2 66697     .......      77024

. ..................................
10000 654786 3412.54 ...... 336721 V10 1 4356.8 2 98777 . .......

10000 98712.567

this format is not convenient to read.
can you hint me where the problem is and how can I make it back to the first format?
I worked on this hours but still can not figure out.

any suggestions highly appreciated!

thank you

yong



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 Wed Jun 01 15:09:31 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:17 EST