- Internal
- Fix upcoming namespace clash with data.table for
%notin%
- Fix upcoming namespace clash with data.table for
-
Internal:
- Fix class() == "character" infelicity
-
Enhancements
select_which
gains argument.and.grep
-
Bug fixes:
longest_affix
now correctly returns single character prefixes. (#40) Thanks to @piosierra for reporting.
-
New functions
seq_nrow(x) = seq_len(nrow(x))
for abbreviationfst_columns
,fst_nrow
the namesnrow
of anfst
file
-
Enhancements:
if_else
now supportsraw
output
-
Performance:
drop_empty_cols
usesis.na(x[1])
rather thananyNA(x)
for higher performance on non-empty columns andhutilscpp
if available
- Technically breaking change:
test_1-3-0_weighted_ntile.R
has been modified to skip a test which relied on old behaviour of package survey. I have not accompanied this with a major version change.
Mode
is now less clever and more speedy for sparse integer inputs
- New functions
goto_pattern_in
an enhancement offind_pattern_in
to jump to a line in RStudio.prohibit_
functions for argument checking
-
Bug fixes:
weighted_ntile
is less susceptible to integer overflow (#36)
-
Internal
- Version dependencies now have no upper bound for recommended packages, to avoid issues with CRAN.
-
Bug fixes:
samp
works with size > length.
-
New functions
provide.file
To ensure a file (including its directory) exists.
-
Enhancements:
provide.dir
returns the directory requested on success.
-
New functions:
-
%<->%
To swap values between objects -
average_bearing
, the bearing bisecting two vectors -
dir2
, (Windows only) a much faster version ofdir()
-
Mode
, statistical mode -
replace_pattern_in
to find-and-replace on a pattern in all files in a directory -
samp
, a 'safe' version ofsample
.
-
-
Enhancements
drop_empty_cols
should now be faster, especially when there are few empty columns.weight2rows
supportsrows.out < 1
to produce a sample.weight2rows
is now faster for default arguments, by using therep(x, w)
trick used intidyr::uncount
.mutate_ntile
now works for a variable withDT
find_pattern_in
now acceptsfile_contents_ignore_case
.find_pattern_in
no longer complains aboutperl
,fixed
conflicts.
-
Bug fixes:
weight2rows
:- no longer reorders the columns in the result
- no longer updates by reference the data frame to be a data.table, instead a copy is made
-
New functions:
weighted_quantile
, likequantile
but for weighted dataweighted_ntile
, likedplyr::ntile
but for weighted datamutate_ntile
convenience function for adding new column withntile
strim_common_affixes
, and associated helperslongest_prefix
andlongest_suffix
.
-
Enhancements:
weight2rows
gains arows.out
argument to specify the number of rows in the result.
-
New functions:
RQ(p, yes, no)
short forif (!requireNamespace("p", quietly = TRUE)) yes else no
.isAttached
for conveniently determining whether a namespace is attachedahull
for locating rectangles in a plot, as for automatically locating a text box.Switch
vectorized version ofswitch
to avoid nestedif_else
's.
-
drop_grep
is an alias fordrop_colr
. -
Minor changes:
if_else
reports a clearer error message whenlength(condition) == 1
.
-
Change of stable test:
- The only changes were so that the test proceeds when a required package is present. The tests would never have succeeded in cases where they now skip. Consequently the major version number has not been incremented.
-
Bug fix:
find_pattern_in
respectsinclude.comments
-
Enhancement:
find_pattern_in
accepts argumentwhich_lines
to allow multiple lines per file, not just the first (the default).
-
New functions:
auc
: area under the curve given predicted and actual values.select_grep
: select columns matching a pattern.dev_copy2a4
: convenience function for copying to an A4 PDF.
-
Other minor changes:
if_else
should be slightly faster when the condition containsNAs
. before: 3.6 ms now 1.5 ms (for 100,000 entries -- see vignette)drop_constant_cols
first checks whether the first and second entries are identical before working out the number of unique values.
- Stable release:
- All tests are now marked as major release.
- New function
%notchin%
for a 'safer' alternative to%notin%
.
- New function
implies
, logical implies. - New function
drop_constant_cols
- New function
print_transpose_data_table
for glimpsing data tables by rows - New alias
pow
for exponentiation. - Bug fixes:
- Ensure
drop_empty_cols
retains non-empty columns when duplicate names are used. coalesce
errors if there is...
wrongly contains factors.
- Ensure
- Changed
if_else
to reflect dplyr's formals so it can be a drop-in replacement. - Fix error for multi-length
missing
value inif_else
when length-onecondition
. - Add vignette
- Minor performance improvements
- Added a
NEWS.md
file to track changes to the package. - New functions
%ein%
%enotin%
avoid misspellings in filtersAND
,NEITHER
,NOR
,OR
,nor
,neither
logical aliasesdrop_colr
drop columns matching patternngrep
negate regular expressionselect_which
similar todplyr::select_if
set_colsuborder
change the order of some columns without affecting the order of othersweight2rows
convert a weighteddata.table
to an unweighted one by repeating rows by the weightcoalesce
andif_else
: lightweight versions ofdplyr::
equivalents
- Bug fixes:
set_cols_first|last
now respects the order of the supplied columns
- Enhancements:
mutate_other
now accepts amass
argument as another way to generate an 'Other' column.