Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: splitting a large file without reloading it in the memory.


From   "Ashim Kapoor" <[email protected]>
To   [email protected]
Subject   st: splitting a large file without reloading it in the memory.
Date   Fri, 26 Dec 2008 10:35:00 +0530

Hello everyone,

Here is what I do now : ---

foreach x in apple orange mango {
clear
use hugefruitbasket <==== HUGE FILE
keep if symbol=="`x'"
save `x', replace

}

-------------------------------------------

So essentially I load a huge file in memory, which makes my computer
hang for a moment, then I keep a portion of it, give it a name and
save it.

------------------------------------------

What I want to do is : --- Load a big file ONCE, then do something like
save `x' if symbol==`x'
or outsheet  if symbol==`x'
so that I can save parts of the  file without reloading / messing the
original file.

I think this is very useful for me.

Is there a clever command to do this ?

Thank you,
Ashim.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index