Skip to content

error (fwd)

2 messages · Cere M. Davis, Thomas Lumley

#
Hi folks,

I've got this funny problem with R's foreign library when reading stata
files.  One file consistently produces vector out of memory errors after
gobbling up 2.7G of memory.  I parsed through the read.dta function and
figured out where the error occurs and the description is below.  I am
running R-1.8.1 on Debian stable system glibc2.2 kernel 2.4.24.  R is is
compiled from source as a shared library.  The file that I am reading is
only 172M in size.  The system I am using has 4G of free memory and 8 G of
swap so this doesn't seem to be a problem for lack of free memory.  See
Below.

Thanks.
-----------------------------------------------------------------------

I stepped through the
function and found that everything runs fine but I get a bunch of warnings
duing the convert.factors section of the code like:
Warning messages:
1: Value labels (fafdstmp) for afdstmp are missing
2: Value labels (fafsmon) for afsmon are missing
3: Value labels (fafsnum) for afsnum are missing
4: Value labels (fafsval) for afsval are missing
5: Value labels (fahcmcar) for ahcmcare are missing
6: Value labels (fahengyv) for ahengyv are missing
7: Value labels (fahenrgy) for ahenrgy are missing
8: Value labels (fahflnch) for ahflnch are missing
9: Value labels (fahflnno) for ahflnno are missing
10: Value labels (fahhcvhi) for ahhcvhi are missing
11: Value labels (fahhhino) for ahhhino are missing
12: Value labels (fahhnum) for ahhnum are missing
13: Value labels (fahmcnum) for ahmcnum are missing
14: Value labels (fahncvhi) for ahncvhi are missing

etc.


then when I try and return rval as the last line in the function and this
is where R starts gobbling up a tone of memory and eventualy dies with a
vector memory exhausted error.

Do you have a sense of where this could be coming from?  Must be something
funny about the communication between the foreign library and the main R
lib.

I'll email the R folks.
On Wed, 4 Feb 2004, Mark S. Handcock wrote:

            
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
		        Cere Davis
		Unix Systems Administrator - CSDE
            cere at u.washington.edu   ph: 206.685.5346
         https://staff.washington.edu/cere

GnuPG Key   http://staff.washington.edu/cere/gpgkey.txt
Key fingerprint = B63C 2361 3B9B 8599 ECC9  D061 3E48 A832 F455 9E7FA
#
On Wed, 4 Feb 2004, Cere M. Davis wrote:

            
I though this bug had already been fixed (Stefano Iacus reported it to me
a while back).  The problem occurs when a variable has a set of factor
names assigned, but that set of names is not present in the file -- it was
not clear from the otherwise excellent Stata documentation that this is
possible in  a valid .dta file.

Obviously the fix is not completely effective.  I'll look into it.

	-thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle