Changelog
Source:NEWS.md
CleanLASA 1.0.0
First stable release.
New features
-
transform_lasa_data()reshapes LASA data between wide format (one row per respondent, as in Z files) and long format (one row per respondent per wave). Long format has aWavecolumn and aTimecolumn that counts waves from each respondent’s own cohort baseline (B, 2B, 3B, MB or 4B). Merged and stacked files work too. -
read_lasa_sav(format_as_long = TRUE)returns a file in long format straight away. - Wide output can name columns by wave (
prefix = "Wave") or by time since baseline (prefix = "Time"). Time-prefixed data carries acohortcolumn that merges withLASAZ002.sav’s. - Cross-wave Z files such as
LASAZOA1.savare now labelled and converted to factors.
Missing values
- The new
keep_user_naargument decides what happens to missing-value codes, and it does the same thing for every variable type. WithFALSE(the default), every missing code becomesNA. WithTRUE, every missing code is kept, as label text or as a declared-missinghaven_labelled_spssvalue.user_nais deprecated: a supplied value is used askeep_user_na, with a warning. - Discrete negative codes are always treated as missing, even when the label sounds substantive (e.g. “never had job” or “valid score”). Variables whose genuine values can be negative (e.g. dB thresholds) keep those values. The label database marks them with
can_be_negative.
Label database
- Fixed many gaps and errors in the bundled label database, including the ones reported in #18.
- “na, see …” routing labels now name only the referenced variable.
- Codes that have no wording are named after their number. Listed values of numeric variables that have no wording are dropped.
- The bundled database is now found even without
library(CleanLASA).