Skip to content

docs: document retained metadata for read_xpt/write_xpt (#719)#801

Closed
LeonidasZhak wants to merge 3 commits into
tidyverse:mainfrom
LeonidasZhak:docs/xpt-metadata-roundtrip
Closed

docs: document retained metadata for read_xpt/write_xpt (#719)#801
LeonidasZhak wants to merge 3 commits into
tidyverse:mainfrom
LeonidasZhak:docs/xpt-metadata-roundtrip

Conversation

@LeonidasZhak

Copy link
Copy Markdown

Addresses #719.

Documents the metadata retained by read_xpt() and used by write_xpt() for round-tripping:

  • format.sas: Documents that the original SAS variable format is stored as format.sas and that write_xpt() reads it back to preserve the format during round-trips.
  • Value labels: Clarifies that the SAS transport format does not support value labels (they are not retained by read_xpt() and silently ignored by write_xpt()).
  • Round-trip example: Adds a runnable example showing that label and format.sas survive a write_xpt()read_xpt() cycle.
  • Notes: Documents the notes attribute for completeness.

This is a documentation-only change to R/haven-sas.R, man/read_xpt.Rd, and NEWS.md. Complements the existing read_sas/read_dta/read_spss metadata docs.

Relation to #800: PR #800 documents the labelled() class and value label workflow for read_sas/read_dta/read_spss. This PR focuses on the XPT-specific metadata that #800 does not cover. No overlap.

Checks run locally:

  • tools::checkRd("man/read_xpt.Rd") — clean
  • R CMD build --no-build-vignettes . — clean
  • _R_CHECK_FORCE_SUGGESTS_=false R CMD check --no-manual --ignore-vignettes --no-build-vignettes --no-tests haven_2.5.5.9000.tar.gz — 1 pre-existing NOTE (setNames in NAMESPACE), unrelated to this change
  • Round-trip example verified manually

- Add format.sas round-trip documentation to read_xpt @return
- Document that value labels are not supported by XPT format
- Add round-trip example showing label and format.sas preservation
- Update NEWS.md with XPT metadata documentation entry
PR tidyverse#801 updated R/haven-sas.R with format.sas and notes documentation
for read_sas() but did not regenerate the corresponding Rd file.
…S metadata docs

- Fix read_xpt round-trip example: use 'BEST12' without trailing period
  (ReadStat strips trailing periods from XPT format names)
- Add note about format.sas trailing period behavior to read_xpt docs
- Add format.stata and notes docs to read_dta
- Add format.spss, display_width, na_values/na_range, notes docs to read_spss
- Regenerate read_xpt.Rd, read_dta.Rd, read_spss.Rd from roxygen source
@LeonidasZhak

Copy link
Copy Markdown
Author

I am withdrawing this PR as part of a broader cleanup of an oversized automated contribution batch. I am sorry for the review noise and the pressure this may have put on maintainers. Going forward I will keep contributions to this project much more limited and higher-signal, ideally only one or two focused PRs at a time. Thank you for maintaining the project.

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.

1 participant