Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functionality to obtain SAS Label of each variable #11

Closed
rsgoncalves opened this issue Aug 24, 2022 · 4 comments
Closed

Functionality to obtain SAS Label of each variable #11

rsgoncalves opened this issue Aug 24, 2022 · 4 comments

Comments

@rsgoncalves
Copy link

Would it be possible to obtain the SAS Label of each variable, to facilitate analysis/post-processing of study variables?

For example, to have all the following details of each variable:

Variable Name: DRDINT
SAS Label: Number of days of intake
English Text: Indicates whether the sample person has intake data for one or two days.

@cjendres1
Copy link
Owner

Most straightforward way would be to modify nhanesTranslate to return those fields.
I'll take a look
Thanks

@cjendres1
Copy link
Owner

nhanesCodebook.txt

Please rename the attached file to nhanesCodebook.R
For some reason it doesn't allow attaching '.R' files
In your R session
1: source('nhanesCodebook.R')
2: nhanesCodebook('AUX_D', 'AUQ020D')

Let me know if the result of the last command is what you're looking for. It's a list since there's a mixture of data types.
Please test it out as much you can and let me know if there's any unexpected behavior.
Thanks!

@rsgoncalves
Copy link
Author

Thank you for the prompt response and resolution! The nhanesCodebook.R (and nhanesCodebook function) are exactly what is desired. After some basic tests things look good to me. Thanks!

@cjendres1
Copy link
Owner

Fix added to nhanesA 0.7.1 which is now on CRAN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants