[R] Reading SPSS: underlying numerical codes

Ista Zahn istazahn at gmail.com
Thu Apr 12 20:06:01 CEST 2012


Hi Marion,

I don't have access to SPSS, so it would be hard for me to figure this
out for you. I would think that string variables would be imported as
strings or factors even when use.value.labels is true, but can't
verify that.

Good luck,
Ista

On Thu, Apr 12, 2012 at 7:59 AM, Marion Wenty <marion.wenty at gmail.com> wrote:
> Hi Ista,
>
> thank you for your reply!
>
> Yes, I looked at the help sheet but didn't use this command because I would
> still like the categorial variables to be converted into factors and have
> the value labels from SPSS imported into R as levels.
>
> With the
>
> use.value.labels = FALSE?
>
> command I do get the same underlying codes as in SPSS but I loose the
> information about the levels, I think.
>
> Does anyone know a way to preserve both?
>
> Thank you very much for your help in advance?
>
> Marion
>
>
> 2012/4/12 Ista Zahn <istazahn at gmail.com>
>>
>> Hi Marion,
>>
>> Did you look at the help file? Did you try use.value.labels = FALSE?
>>
>> Best,
>> Ista
>>
>> On Thu, Apr 12, 2012 at 6:28 AM, Marion Wenty <marion.wenty at gmail.com>
>> wrote:
>> > Dear people,
>> >
>> > I have got a question concerning the underlying numerical codes when
>> > reading an SPSS file into R.
>> >
>> > I used the package foreign and when I look at a variable I get the
>> > verbal
>> > codes.
>> >
>> > I would like to know how it is possible to get the underlying numerical
>> > codes as output, which are the same as in my SPSS file.
>> >
>> > Thank you very much in advance for your help!
>> >
>> > Marion
>> >
>> >        [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-help at r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> > http://www.R-project.org/posting-guide.html
>> > and provide commented, minimal, self-contained, reproducible code.
>
>



More information about the R-help mailing list