[R] read.spss (package foreign) and SPSS 15.0 files
Frank E Harrell Jr
f.harrell at vanderbilt.edu
Tue Apr 17 18:24:15 CEST 2007
John Kane wrote:
> --- Charilaos Skiadas <skiadas at hanover.edu> wrote:
>> On Apr 16, 2007, at 10:41 AM, John Kane wrote:
>>> --- Charilaos Skiadas <skiadas at hanover.edu> wrote:
>>>> It is not an "export" option, it is a "save as"
>>>> option. I don't have
>>>> a 14 to check, but on a 15 I just go to File ->
>>>> As, and change
>>>> the "Save as type" field to "Comma Delimited
>>>> (.*.csv)". (I suppose
>>>> tab delimited would be another option). Then
>>>> are two check-
>>>> boxes below the window that allow a bit further
>>>> customizing, one of
>>>> them is about using value labels where defined
>>>> instead of data values.
>>> I'm now back on a machine with SPSS 14. No csv
>>> that I can see. Perhaps an enhancement to v15.
>> I don't have a 14, but I did check a 13 today and
>> you are correct, no
>> csv option is there, which in my opinion is quite
>> unacceptable for a
>> statistical package that is on its 13/14th version.
>> But there was an
>> option for "Excel 97 and ...", and that seemed to
>> allow using value
>> labels instead of the values (again you have to
>> check the
>> corresponding box). So perhaps that would be an
> Not my problem at the moment but a colleague pointed
> out that he had 750+ variables. Excel handles 256.
> Actually my problem is now a SAS one where I can get a
> clean csv export but lose the variable labels. My
> crude workaround was just to do a proc contents and
> cut-and-paste the results. A pain but it worked.
> I've got to figure out why I cannot get Hmisc to work!
And note that Hmisc has other SAS import options besides sas.get that
keep labels. Some of them require you to run PROC CONTENTS CNTLOUT= to
save metadata in a dataset.
> Thanks for the suggestion.
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
More information about the R-help