0

Hello.. is it possible to append some data on a text output file appending the data to each row, and without use too much computational I/O ??

Instead of the classical way:

VARX     VARY      VARZ...
year1  x1        y1        z1
year2  x2        y2        z2

.. I would like to use the much more redeable:

year1    year2 ..
VARX    x1       x2 ...
VARY    y1       y2 ...
VARZ    z1       z2 ...
...

where the 1,2 series are wroted on different times.. a sort of a appendByRow() function.. and I would avoid of load the whole file in memory and then printing it line-by-line..

is it possible ??

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by Narue
0

>I would avoid of load the whole file in memory and then printing it line-by-line..
Read a line, process it, and write it to a temporary file. Then delete the original file and rename the temporary.

>is it possible ??
It's hard to say. You talk about appending to a row, but your description of the desired result suggests that you want to transpose a matrix, which makes your storage and performance requirements more difficult to meet.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.