Skip to contents

lighthouse.codebook 0.3.2

Fixed

  • Fixed spacing between decked heads on grouped summary tabs (fixes #29).

Internal

  • Added cb_create_spss_impl() and cb_write_impl() for SPSS extension command interface / future-proofing.

lighthouse.codebook 0.3.1

Fixed

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_rows controls both numeric and categorical summaries, while group_rows_numeric and group_rows_categorical control numeric and categorical summaries, respectively.

  • Added an introductory vignette (see vignette("lighthouse-codebook")).

  • Expanded the README.

Changed

Removed

lighthouse.codebook 0.2.3

  • cb_create_spss() now accepts .rmv_html and .rmv_line_breaks arguments, consistent with cb_create() and cb_create_redcap(). If TRUE (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" in cb_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_numeric argument in cb_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 by cb_write() (fixes #13).

  • cb_summarize_text() now includes user missings when detail_missing is TRUE (fixes #14).

  • Several bugs affecting cb_summarize_categorical() were fixed:

    • The prefixed argument now works as expected (fixes #2).
    • Observed values without value labels are now handled correctly (fixes #4).
    • Missing values in "haven_labelled" vectors are now handled correctly (fixes #16).
  • Datasets containing only categorical variables no longer cause cb_write() to throw an error (fixes #15).

lighthouse.codebook 0.1.1

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 by cb_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 setting hyperlinks to FALSE.

  • The .split_var_labels argument to cb_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:colors4 yields:

    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_types is TRUE (the default). Detailed class information can be requested by setting .include_r_classes to TRUE.

  • n for each subgroup are now included in decked headers for grouped summaries.

  • In cb_write(), changed detail_missing argument from logical to options "if_any_user_missing", "yes", and "no".

  • cb_summarize_numeric(), cb_summarize_categorical(), and cb_summarize_text() now return NULL when there are no variables of the relevant type, with an optional warning controlled by the .warn_if_none argument.

  • 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_html and .rmv_line_breaks arguments to logical rather than tidyselect.