| ![]() |
From | David Kantor <kantor.d@att.net> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: binary format type str question |
Date | Mon, 12 Mar 2007 22:11:03 -0400 |
At 08:35 PM 3/12/2007, Mark Fisher wrote:
Hi. I'm writing a Mathematica program to read stata "dta" files. I have the "Stata help for dta" page, which is quite useful. Everything seems to work fine as long as the data types are in the range 251 to 255 (byte, int, long, float, or double). But I can't figure out how to properly read the data when the data types are in the range 1 to 244 (str1, str2, ... str244). BTW, I have no trouble reading the "char" strings for the data_label and the time_stamp; I just read them in as a list of bytes, discard the bytes starting with the first zero, and convert the remaining bytes to ascii. But the str types don't seem be the same sort of beast. Any guidance would be appreciated. Thanks.I'm not looking at the documentation for this, and I've never done any work like that, but I do recall reading that the string types are stored such that...
--Mark.
© Copyright 1996–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |