[R] Value Labels: SPSS Dataset to R
bgunter@4567 @end|ng |rom gm@||@com
Fri Feb 7 18:05:53 CET 2020
What does your data look like after importing? -- see ?head and ?str to
tell us. Show us the code that failed to provide "labels." See the posting
guide below for how to post questions that are likely to elicit helpful
I know nothing about the haven package, but see ?factor or go through an R
tutorial or two to learn about factors, which may be part of the issue
here. R *generally* obtains whatever "label" info it needs from the object
being tabled -- see ?tabulate, ?table etc. -- if that's what you're doing.
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Fri, Feb 7, 2020 at 8:28 AM Yawo Kokuvi <yawo1964 using gmail.com> wrote:
> I am just transitioning from SPSS to R.
> I used the haven library to import some of my spss data files to R.
> However, when I run procedures such as frequencies or crosstabs, value
> labels for categorical variables such as gender (1=male, 2=female) are not
> shown. The same applies to many other output.
> I am confused.
> 1. Is there a global setting that I can use to force all categorical
> variables to display labels?
> 2. Or, are these labels to be set for each function or package?
> 3. How can I request the value labels for each function I run?
> Thanks in advance for your help..
> Best, Yawo
> [[alternative HTML version deleted]]
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help