Skip to content

Clarify labelled vectors in read docs#800

Open
LeonidasZhak wants to merge 1 commit into
tidyverse:mainfrom
LeonidasZhak:codex/clarify-labelled-read-docs
Open

Clarify labelled vectors in read docs#800
LeonidasZhak wants to merge 1 commit into
tidyverse:mainfrom
LeonidasZhak:codex/clarify-labelled-read-docs

Conversation

@LeonidasZhak

Copy link
Copy Markdown

Fixes #741.

This updates the read_*() documentation to make the imported labelled-vector workflow more explicit for users coming from Stata, SPSS, or SAS:

  • notes that value labels are preserved as labelled() / labelled_spss() intermediate representations, not regular R factors
  • points users to as_factor() for labelled categorical variables
  • points users to zap_labels() when plain R vectors are needed for analysis
  • updates the generated Rd files and NEWS entry alongside the roxygen source

I kept this as a documentation-only change and did not add a runtime message, following the maintainer preference in #741.

Checks run locally:

  • tools::checkRd() for man/read_dta.Rd, man/read_spss.Rd, and man/read_sas.Rd
  • git diff --check
  • R CMD build --no-build-vignettes .
  • _R_CHECK_FORCE_SUGGESTS_=false R CMD check --no-manual --ignore-vignettes --no-build-vignettes --no-tests haven_2.5.5.9000.tar.gz

The local machine does not currently have suggested packages testthat and covr, so I could not run the full test suite locally. The no-tests check installs the package, checks Rd/examples, and completes with one existing NOTE about setNames that is unrelated to this documentation change.

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

Successfully merging this pull request may close these issues.

Remind the novice user of labelled-format?

1 participant