The DHS Program User Forum - RDF feed
https://userforum.dhsprogram.com/index.php
label of variables in DTA file
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=14915&th=7036#msg_14915
I am working with the DHS datasets (about domestic violence). I manage to download the different datasets by country (in DTA format). I see in the DTA files that the labels of the variables are present (like "date of interview", "region", etc just below the abbreviate variables. But when I open the file with the R command:
dta=read.dta(AFCR70FL.DTA, convert.factors = FALSE) or dta=read.dta(AFCR70FL.DTA, convert.factors = TRUE)
I can vizualize the dta file but the long name of the variables are not present anymore. Is there any way to retain the name of the different columns after opening the fiel?
Many thanks in advance for your help,
Alice
]]>alice.b2018-05-15T11:02:42-00:00Re: label of variables in DTA file
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=14927&th=7036#msg_14927
Unfortunately R does not have a built in way to handle variable labels. I found an exchange on this question online that may help. The link has a few solutions you can try including some suggested packages.