How to save large output sufficiently fast in text or any other format?
<p>My question is: how to save the output i.e., <code>mydata</code></p>

<pre><code> mydata=array(sample(100),dim=c(2,100,4000))
</code></pre>

<p>reasonably fast? </p>

<p>I used the <code>reshape2</code> package as suggested <a href="https://stackoverflow.com/questions/21474986/saving-a-multi-dimensional-matrix-to-a-file">here</a>.</p>

<pre><code> melt(mydata)
</code></pre>

<p>and</p>

<pre><code> write.table(mydata,file="data_1")
</code></pre>

<p>But it is taking more than one hour to save the data into the file. I am looking for any other faster ways to  do the job.</p>