Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Compress a closed file


From   "Michael N. Mitchell" <[email protected]>
To   [email protected]
Subject   Re: st: Compress a closed file
Date   Tue, 22 Feb 2011 01:49:44 -0800

Greetings

I do not know how to compress a file that is too large to fit into memory. But, you could read portions of the file into memory, compress the portions, and then reassemble the portions. This assumes that the -compress- command will yield enough memory savings.

  You can read a portion of the file either by reading a subset of variables, e.g.

. use var1 var2 var3 using myfile.dta

  or you can read a subset of observations, e.g.

. use if gender==1 using myfile.dta

  or

. use in 1/5000 using myfile.dta

  You can use the describe command to learn the variable names of the file, for example...

. describe using myfile.dta

It is possible that you might be able to read in just the variables and/or observations you are interested in using these techniques.

  I hope this helps,

Best luck,

Michael N. Mitchell
Data Management Using Stata      - http://www.stata.com/bookstore/dmus.html
A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
Stata tidbit of the week         - http://www.MichaelNormanMitchell.com



On 2011-02-22 1.42 AM, Mohamad Al Ississ wrote:
Hi,
The file I'm trying to open a file that's too large for my Stata's memory (I
maxes the memory setting). I get the "no room to add more observations..."
error. I know that if I compress the file, it'll solve the problem. Is there
a way to compress the file w/o opening it?
Thanks!

Mohamad Al-Ississ, Ph.D.
Assistant Professor of Economics
School of Business
The American University in Cairo
*
*   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/
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index