Recent Releases of scrutiny
scrutiny - scrutiny 0.5.0
The package is now released under the MIT license.
Breaking changes
The
ratiocolumn in the output ofgrim_map()andgrim_map_seq()was replaced by aprobabilitycolumn. This means:- Numerically, the only difference is that
probabilityis zero wheneverratiowas negative. Conceptually, it is much easier to interpret: it is the probability that a reported mean or percentage of integer data that has a specific number of decimal places but is otherwise random is GRIM-inconsistent with the reported sample size.
For example,
probabilityis0.6for a mean of1.23and a sample size of40. The same is true for any other mean with two decimal places. Thus, a randomly chosen mean with two decimal places, ostensibly derived from integer data, has a 0.6 probability of being GRIM-inconsistent with the reported sample size.
- Numerically, the only difference is that
In the functions around
grim_ratio(), thexargument must now be a string. This is consistent withgrim_map(),unround(), etc.; and it prevents erroneous results that could previously occur by omitting trailing zeros.The GRIMMER implementation was debugged, so that
grimmer_map()etc. may now yield different results in a few cases. In particular, theitemsargument now works correctly, thanks to Aurélien Allard and Lukas Wallrich (#58).is_seq_dispersed()now correctly returnsFALSEif different numbers of missing values at the start and end ofxmean thatxcannot be dispersed aroundfrom.
New features
- The
probabilitycolumn (see above) is created by a new function,grim_probability().
Lifecycle updates
Deprecated
As a consequence of the above, the
show_probargument ofgrim_map()is now deprecated and will be removed in a future version. It no longer has any effect.grim_ratio_upper()is deprecated and will be removed in a future version. It no longer seems very interesting (and likely never was), especially now that the GRIM ratio in general has taken a backseat.All 15 (!) functions around
is_subset_of()are deprecated and will be removed in a future version. In truth, they were always poorly written and widely out of scope for scrutiny.
Removed
All of these had been deprecated since scrutiny 0.3.0:
audit_list()was removed.The
separgument inrestore_zeros()andrestore_zeros_df()was removed.The
numeric_onlyargument induplicate_count()andduplicate_detect()was removed.The
na.rmargument induplicate_count_colpair()was removed.
- R
Published by lhdjung almost 2 years ago
scrutiny - scrutiny 0.4.0
This version brings major performance improvements. Furthermore:
Bugfixes
- Fixed a bug in
audit_seq(): If thedispersionargument in the preceding call to a function likegrim_map_seq()was specified as something other than a linearly increasing sequence, the"diff_*"columns in the data frames returned byaudit_seq()may have contained incorrect values. - Similarly,
audit_seq()andreverse_map_seq()used to reconstruct the reported values incorrectly if thedispersiondefault was overridden as described above. At least for now, the issue is handled by throwing an error if these functions operate on data frames that are the result of specifyingdispersionas something other than a linearly increasing sequence. - Fixed a bug that incorrectly threw an error in
grim_map_seq(), other functions made byfunction_map_seq(), as well asseq_disperse()andseq_disperse_df()if an input value was so close toout_minorout_maxthat the output sequence would be shorter than implied bydispersion/.dispersion, and iftrack_var_change/.track_var_change(see below) wasTRUE. Again, note that the bug only occurred if an error was thrown.
New features
- A new vignette lists the options for specifying the
roundingargument that many scrutiny functions have:vignette("rounding-options"). - Another new vignette shows the minimal steps to implement a consistency test using scrutiny:
vignette("consistency-tests-simple"). - The output of
grim_map_seq(),grimmer_map_seq(),debit_map_seq()and any other function made byfunction_map_seq()now has adiff_varcolumn that tracks the difference between the dispersed variable (see thevarcolumn) and the reported value. Following thediff_*columns in the output ofaudit_seq(), this is the number of dispersion steps, not the actual numeric difference. - The same
diff_*columns are now integer, not double. -
function_map(),function_map_seq(), andfunction_map_total_n()have a new.name_key_resultargument that controls the name of the key result column in the output of the factory-made function. This is"consistency"by default, but other names will fit better for other kinds of tests. (The results of these tests must still be logical values.)
Minor changes
- In
duplicate_count(), thecountcolumn in the output tibble was renamed tofrequency. This makes for a more streamlined frequency table and removes an ambiguity withduplicate_count_colpair(), where thecountoutput column means something different. - In
seq_disperse()andseq_disperse_df(), thetrack_var_change/.track_var_changeargument was renamed totrack_diff_var/.track_diff_var. The arguments with the old names are still present for now but will be removed in a future version. Also, the unit of these values is now dispersion steps, for consistency withgrim_map_seq()etc. as well asaudit_seq(). -
grim_total(),grim_ratio(), andgrim_ratio_upper()now requirexto have length 1. - The docs now link to functions when opened in RStudio, not just on the website.
- Accordingly, the output of
write_doc_factory_map_conventions()now renders links. The function also has a newscrutiny_prefixargument for use in another package. - The "Infrastructure" article was renamed to "Developer tools";
vignette("devtools"). - Some dependencies that used to be suggested are now imported.
- R
Published by lhdjung over 2 years ago
scrutiny - scrutiny 0.3.0
Duplicate analysis overhaul
The duplicate_*() functions now present their output better and have overall been streamlined. Read more at vignette("duplicates").
A new function,
duplicate_tally(), marks each observation with its overall frequency. It is similar toduplicate_detect()but more informative.In
duplicate_count():- All values are now treated like character strings, so all can be checked. The
numeric_onlyargument is deprecated and should no longer be used. - The output tibble has two new columns,
locationsandlocations_n. These hold the names of all input columns in which a value appears and the number of these columns. Details are controlled by the newlocations_typeargument. - New
ignoreargument for specifying one or more values that will not be checked for duplicates.
- All values are now treated like character strings, so all can be checked. The
In
duplicate_count_colpair():- New
total_xandtotal_ycolumns in the output show how many non-missing values were checked for duplicates. - New
ignoreargument as induplicate_count(). - The
na.rmargument is deprecated. It wasn't very useful because missing values are never checked for duplicates.
- New
duplicate_detect()is superseded. It is less informative thanduplicate_count()and, in particular,duplicate_tally(). Still, it shares in the overhaul:- As in
duplicate_count(), all values are now treated like character strings, so all can be checked. Thenumeric_onlyargument is deprecated and should no longer be used. - The duplicate status of missing values is now shown as
NA. - New
ignoreargument as induplicate_count().
- As in
Bugfixes
Fixed a numeric precision bug in
round_up_from()andround_down_from()that occurred when rounding numbers greater than circa 2100 with a part to be truncated that was equal to 5 on that decimal level (thanks to \@kaz462, #43). These functions are called withinround_up()andround_down(), and indirectly by all consistency-testing functions.Fixed a bug in
audit_seq()that displayed one "hit" found by varying a given reported value if there were no such hits. The other columns were not affected.Fixed a bug in
function_map()that displayed the wrong calling function's name in case of an error.
Minor improvements
Documentation for
grim_map_seq()and all other functions made byfunction_map(),function_map_seq(), orfunction_map_total_n()now displays meaningful defaults. Printing the factory-made functions is more meaningful, as well. Internally, they now work withrlang::new_function(), which allows for flexible metaprogramming.The experimental function
audit_list()is deprecated. Just useaudit()instead.audit_seq()andaudit_total_n()are now documented separately fromaudit()andaudit_list().The lifecycle package is now imported and used in formal deprecations such as that of
sepin therestore_*()functions. The janitor package is no longer suggested.Adjusted to new CRAN requirements for
packageVersion()usage.Some performance improvements.
- R
Published by lhdjung almost 3 years ago
scrutiny -
scrutiny 0.2.3
Some new features and bugfixes:
New
audit()methods for the output ofaudit_seq()andaudit_total_n().New
duplicate_count_colpair()function that checks each combination of columns in a data frame for duplicates.New
restore_zeros_df()function to easily restore trailing zeros in all numeric-like columns in a data frame.New
seq_length()function to extend or shorten linear sequences.Bugfixes in the
is_seq_*()functions.Some possible corner case issues in
split_by_parens()are now prevented.Internal changes for compatibility with purrr 1.0.0 and tidyselect 1.2.0.
- R
Published by lhdjung over 3 years ago
scrutiny - Release of scrutiny 0.2.2
scrutiny 0.2.2.9000 (development version)
"Releasing" the development version right now in order for the website (https://lhdjung.github.io/scrutiny/) to flag a bug in the GRIMMER implementation, concerning the items argument used for composed scales.
scrutiny 0.2.2
This is a patch for CRAN compliance.
The package now requires R version >= 3.4.0 and rlang version >= 1.0.2.
Subtle changes to
split_by_parens()that users generally won't notice.Minor shifts in the documentation (e.g.,
vignette("consistency-tests")now has instructions on exporting factory-made functions.).
What's Changed
- Devel by @lhdjung in https://github.com/lhdjung/scrutiny/pull/3
- Devel by @lhdjung in https://github.com/lhdjung/scrutiny/pull/4
- remove SPRITE reference: CRAN checks by @lhdjung in https://github.com/lhdjung/scrutiny/pull/5
- Devel by @lhdjung in https://github.com/lhdjung/scrutiny/pull/6
- updated Authors@R field in DESCRIPTION by @lhdjung in https://github.com/lhdjung/scrutiny/pull/7
- correct renamed function; also cut repeat word by @lhdjung in https://github.com/lhdjung/scrutiny/pull/8
- Devel by @lhdjung in https://github.com/lhdjung/scrutiny/pull/9
- add "Resubmission" header in CRAN comments by @lhdjung in https://github.com/lhdjung/scrutiny/pull/10
- add trailing slash to second URL in DESCRIPTION by @lhdjung in https://github.com/lhdjung/scrutiny/pull/11
- Devel by @lhdjung in https://github.com/lhdjung/scrutiny/pull/12
- Devel by @lhdjung in https://github.com/lhdjung/scrutiny/pull/13
- Devel by @lhdjung in https://github.com/lhdjung/scrutiny/pull/14
New Contributors
- @lhdjung made their first contribution in https://github.com/lhdjung/scrutiny/pull/3
Full Changelog: https://github.com/lhdjung/scrutiny/commits/v0.2.2
- R
Published by lhdjung almost 4 years ago