Changelog
Source:NEWS.md
lighthouse.codebook 0.3.2
Fixed
- Fixed spacing between decked heads on grouped summary tabs (fixes #29).
lighthouse.codebook 0.3.1
Fixed
-
cb_create_spss()no longer throws an error when.user_missing = NULL.
lighthouse.codebook 0.3.0
Added
Added options to
cb_write()to show grouping variables for categorical summaries in rows (which was previously only possible for numeric summaries.)cb_write()now includes three arguments for showing some or all grouping variables in rows:group_rowscontrols both numeric and categorical summaries, whilegroup_rows_numericandgroup_rows_categoricalcontrol numeric and categorical summaries, respectively.Added an introductory vignette (see
vignette("lighthouse-codebook")).Expanded the README.
Changed
-
cb_create(),cb_create_spss(), andcb_create_redcap()now use a single.optionsargument for less commonly used settings. Arguments for those settings have been moved into an options object created withcb_create_options()orcb_create_redcap_options().# previously cb <- cb_create( dat, metadata = metadata, .rmv_html = FALSE, .include_r_classes = TRUE ) # now cb <- cb_create( dat, metadata = metadata, .options = cb_create_options(rmv_html = FALSE, include_r_classes = TRUE) ) ### `cb_create_spss()` also uses `cb_create_options()` # previously cb_spss <- cb_create_spss(dat_spss, .rmv_line_breaks = FALSE) # now cb_spss <- cb_create_spss( dat_spss, .options = cb_create_options(rmv_line_breaks = FALSE) ) ### Note that `cb_create_redcap()` has its own options constructor # previously cb <- cb_create_redcap( dat_rc, metadata = metadata_rc, .form = NULL, .rmv_html = FALSE ) # now cb <- cb_create_redcap( dat_rc, metadata = metadata_rc, .options = cb_create_redcap_options(form = NULL, rmv_html = FALSE) )
Removed
- The
format = "values"option incb_get_data()has been removed (see #26).
lighthouse.codebook 0.2.3
cb_create_spss()now accepts.rmv_htmland.rmv_line_breaksarguments, consistent withcb_create()andcb_create_redcap(). IfTRUE(the default), HTML tags and line breaks are removed from variable and value labels.cb_create_spss()now handles user missing value ranges correctly (fixes #23).detail_missing = "if_any"incb_write()now includes detailed missing values when user missings are only included in SPSS metadata (fixes #24).
lighthouse.codebook 0.2.2
cb_write()no longer throws an error when codebook contains split variable labels but some summary tabs have no label stems.Error messages now correctly report calling arguments (fixes #21).
lighthouse.codebook 0.2.1
- Suppressed warning about missing styles in
cb_write()emitted by openxlsx2 >= v1.23.0.
lighthouse.codebook 0.2.0
New feature
- Grouping variables for numeric summaries can now be shown in rows rather than (or in addition to) columns using the
group_rows_numericargument incb_write().
Bug fixes
Categorical variables are no longer included in summaries generated by
cb_summarize_text()or on the text summary tab of workbooks produced bycb_write()(fixes #13).cb_summarize_text()now includes user missings whendetail_missingisTRUE(fixes #14).-
Several bugs affecting
cb_summarize_categorical()were fixed: Datasets containing only categorical variables no longer cause
cb_write()to throw an error (fixes #15).
lighthouse.codebook 0.1.1
cb_summarize_text()now works as expected when codebook doesn’t include alabelcolumn (fixes #5).Added dependency on R >= 4.3.0 for base pipe placeholder.
Fixed typos and tweaked wording in docs for
cb_create(),cb_create_spss(), andcb_write().
lighthouse.codebook 0.1.0
New function
cb_summarize_text()returns a summary of text variables including unique values, frequencies for the most common values, and missing value information. A tab including this information is now included in workbooks created bycb_write().In workbooks produced by
cb_write(), variable names on the Overview sheet are now hyperlinked to corresponding rows on summary tabs and vice versa. This can be turned off by settinghyperlinkstoFALSE.-
The
.split_var_labelsargument tocb_create()and variants splits variable labels with a common prefix into separate columns. For example, given a set of variable labels that all begin with"Select all that apply: ", the default behavior is:Name Label colors1 Select all that apply: Red colors2 Select all that apply: Green colors3 Select all that apply: Blue colors4 Select all that apply: Orange …but specifying
.split_var_labels = colors1:colors4yields:Name Label Stem Label colors1 Select all that apply: Red colors2 Select all that apply: Green colors3 Select all that apply: Blue colors4 Select all that apply: Orange Multiple sets of variables with common prefixes can be specified by passing a list of tidyselect expressions.
cb_create()and variants now return more general type information (e.g.,"date-time"rather than"POSIXct, POSIXt") when.include_typesisTRUE(the default). Detailed class information can be requested by setting.include_r_classestoTRUE.n for each subgroup are now included in decked headers for grouped summaries.
In
cb_write(), changeddetail_missingargument from logical to options"if_any_user_missing","yes", and"no".cb_summarize_numeric(),cb_summarize_categorical(), andcb_summarize_text()now returnNULLwhen there are no variables of the relevant type, with an optional warning controlled by the.warn_if_noneargument.Categorical, numeric, and/or text summary tabs are now omitted when there are no variables of the relevant type.
In
cb_create()and variants, changed.rmv_htmland.rmv_line_breaksarguments to logical rather than tidyselect.