Skip to contents

lighthouse 0.7.3

New functions

  • ffyq() and sfyq_il() return the federal fiscal year and quarter or Illinois state fiscal year and quarter for a given date. Return format can be set using the type parameter, defaulting to numeric YYYY.Q format. These functions wrap lubridate::quarter() and complement the existing lighthouse functions ffy() and sfy_il().

New functionality

  • summary_table() has new arguments .cols_group_glue and .cols_group_order to control column names and order when .cols_group_by is set. These are replacements for .cols_group_opts, which is deprecated and will be removed in a future release.

Bug fixes

  • fiscal_year(), ffy(), and sfy_il() are now vectorized (fixes #23).

  • summary_table() now accepts functions that do not have an na.rm or ... argument, which previously caused an error.

  • strftime_no_lead():

    • now returns results with default formatting when format is unspecified (fixes #21).
    • now supports the "%OSn" conversion specification. This returns seconds with specified number of decimal places, up to 6; e.g., "%OS3" would return seconds with 3 decimals places.
  • summary_report():

    • no longer issues a deprecation warning related to using !!! on a single language object (fixes #19).
    • now returns consistent column types in output tibble (fixes # 26).
    • setting .missing_label no longer throws errors in some situations (fixes #26).
    • now treats dates and datetimes as nominal by default, and will error on attempts to treat dates or datetimes as continuous or binary.

lighthouse 0.7.2

Bug fixes

Changes to row-wise aggregation functions

Lifecycle changes

Other changes

  • Added a hex logo!

lighthouse 0.7.1

Bug fix

  • strftime_no_lead() now removes leading zeroes only from specified components of date-times (fixes #14).

lighthouse 0.7.0

New functions

Summary functions

  • summary_report() returns a summary of multiple variables, summarizing each variable based on its level of measurement.
  • df_compare() is a utility for identifying differences between data frames. Given two data frames, it returns only rows and columns with differences.

Tools for missing values

Tools for character vectors

Tools for dates

  • ffy() and sfy_il() return the federal fiscal year or Illinois state fiscal year for a given date. They wrap fiscal_year(), which returns the fiscal year based on a specified starting month.
  • strftime_no_lead() formats a date without leading zeroes (e.g., “6/7/2024” instead of “06/07/2024”).
  • nth_bizday() is a generalization of next_bizday().

Tools for service cascades

Statistical functions

  • se_mean() and se_prop() compute standard error of the mean and of a proportion, respectively. se_prop() includes checks for unreliability due to low variance; see its “Details.” se_mean() replaces the ambiguously-named se(), which is now deprecated.
  • ci_sig() tests if a confidence interval indicates statistical significance.
  • OR_to_p1() and OR_to_p2() convert odds ratios to probabilities. They complement p_to_OR().
  • dunn_test() performs Dunn’s test, a pairwise post-hoc test for following up a Kruskal-Wallis test.

Math functions

Variable transformation

Data restructuring

  • add_rows_at_value() is similar to add_blank_rows(), but allows specifying position by column values rather than row numbers. Note there have been some changes in the function interface from the pre-release version; see the “Details” section of the documentation.
  • pad_vectors() pads a list of vectors with NAs to a common length.

Exporting results

  • add_plot_slide() is a helper for exporting plots to PowerPoint with easier control of size and positioning.
  • write_xlsx_styled() writes to .xlsx with basic column formatting.

Data visualization

Other

New datasets

  • gain_missing_codes is a quick reference for missing value labels used in GAIN datasets.

  • state.terr.name and state.terr.abb are versions of state.name and state.abb that include US territories and the District of Columbia. state.terr.data is a data frame including names, abbreviations, and FIPS codes for US states, territories, and the District of Columbia.

Added functionality

  • count_pct() and count_multiple() now support the .by argument for per-operation grouping. Integration of .by into other count_*() functions is planned for a future update.

  • In summary_table(), the column of variable names can be dropped when only one variable is included by setting .var_col_name = NULL (#9).

  • count_duplicates() now returns both the unique and total number of duplicated values. (e.g., c(2, 2, 4, 4) has two unique and four total values.)

  • Added a missing argument to swap_if() with options for cases where the condition is missing.

  • Added a warn_factor argument to try_numeric()

Bug fixes

  • The .cols_group_by argument in summary_table() now produces separate columns by group (fixes #6).

  • count_with_total() now produces totals for non-character columns (fixes #10).

  • days_diff() now handles inputs of different types (e.g., a date and a datetime) with a warning (previously threw an error).

  • Added General Election Day to holidays_il and arranged by date (fixes #1).

  • Removed Inauguration Day from holidays_us.

Lifecycle changes

Other changes

lighthouse 0.6.0

Other changes

lighthouse 0.5.0

  • Check if lighthouse update is available on load
  • New infix operators: %all_in%, %any_in%
  • Exported na_like()

lighthouse 0.4.1

lighthouse 0.4.0