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

A Stata-like codebook function that quickly gives an overview of a variable #90

Closed
anhqle opened this issue Jun 9, 2016 · 5 comments
Closed
Milestone

Comments

@anhqle
Copy link
Contributor

anhqle commented Jun 9, 2016

codebook is a Stata function that gives a quick overview of a variable (its name, missingness, range, value, labels). (See image). Stata users frequently ask for this function when they switch to R.

stata_codebook

Happy to contribute PR if you think it's a good idea.

@krlmlr
Copy link
Member

krlmlr commented Jun 13, 2016

Codebooks are nice, but I'm not sure this is a good fit for the tibble package. Have you seen memisc::codebook()?

@anhqle
Copy link
Contributor Author

anhqle commented Jun 13, 2016

Yes I have. I'd like to see the codebook functionality in tibble (or any other "hadleyverse" package that fits) because I think it's a good idea to centralize all the common data management tasks under the same roof.

For example, arguably data import or different NA values have been done long before haven and tibble. Yet it's a lot better to have all of them in a few packages developed by the same team (the team around dplyr and tibble.) I know the performance will be top-notch, development will be active, and that the packages API will work well together.

Case in point: memisc does not yet manage to import Stata 13 files, not to mention Stata 14. The way it handles variable and value labels requires various manual hacks before I can transition into dplyr data munging.

I think you guys have done a great job finetuning the data import and management process with haven, dplyr, etc. A codebook would be one of the final missing pieces.

@anhqle
Copy link
Contributor Author

anhqle commented Aug 2, 2016

@krlmlr If you have a minute could you take a look at PR #129 that implements Stata-like codebook? There's an output unit test that you can see right away. I'll work on completing this feature if this is something you guys want. If not, please let me know anyway.

@krlmlr krlmlr modified the milestone: 2.0 Aug 8, 2016
@hadley
Copy link
Member

hadley commented Aug 10, 2016

This really doesn't feel quite right for tibble. I'm not sure where it should go yet, but tibble doesn't seem right.

@hadley hadley closed this as completed Aug 10, 2016
@github-actions
Copy link
Contributor

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants