Changelog
Source:NEWS.md
roperators 1.4.0
New features
-
f()— string interpolation (“f-strings”):f("Hi {name}, you have {n} messages"). -
%else%— inline fallback for an expression that might error:read.csv(path) %else% data.frame(). -
%+-%— tolerance-interval constructor that composes with thebetweenoperators:x %><% (5 %+-% 0.5). -
%/0%— safe division that returnsNAinstead ofInf/NaNon divide-by-zero. -
%~%— case- and whitespace-insensitive string equality (the string counterpart to%~=%). -
as.percent()— format a proportion as a percentage string.
Bug fixes
-
is.bad_for_calcs()now correctly flagsInf/-Infas bad for calculations. Previously infinities slipped through, which also affected the comparison operators (%==%,%>=%, …) that rely on it. -
is.R_x64()now callsis.os_unx()correctly (it previously referenced the function without calling it). -
seq_around()now accepts ordinary numeric values forn; it previously errored unlessnwas given as an explicit integer (e.g.5L). - The
betweenoperators (%><%,%>=<%) now handle reversed bounds, so5 %><% c(10, 1)behaves the same as5 %><% c(1, 10). -
%na<-%now also accepts a replacement vector with one entry per missing value (filled in order), in addition to a scalar or a full-length vector. - Removed a stray duplicate (and subtly broken) internal definition of
is.bad_for_calcs().
Improvements
-
as.class()is now vector-safe and no longer builds and parses code from a string internally. -
is.http_available()usesrequireNamespace()instead of the much slowerinstalled.packages(). -
get_system_python(),is_rda_file(), andis_rds_file()are now exported (they were documented in earlier versions but never actually exported).
Documentation, tests & infrastructure
- Documentation overhaul for clarity and consistency: tightened every help page, fixed typos throughout, and added missing
\valuedocumentation and runnable examples. -
%rlike%and%perl%now have their own help page (“SQL-style pattern matching”) instead of being grouped under the logical operators. - Rewritten, comprehensive vignette and a
README.Rmdso the README’s output is always real. - Added a full
testthattest suite covering the operators and helpers, aBugReportsURL, apkgdownsite configuration, and GitHub Actions forR-CMD-checkand pkgdown deployment.
roperators 1.3.14
CRAN release: 2023-07-20
- added
is.os_arm()to check if running ARM cpu - added
get_R_version()to pull current R version - added
get_R_version_age()to find how old the installed R version is - added
get_latest_CRAN_version()to find the latest version on CRAN (rvest required) - added
get_system_python()to return default python called in system calls to “python” - added
%C%for choose operator and%P%for permute - added
%integrate%for inline integrations - added
is.http_available()to check whether you can send an HTTP request (via httr, RCurl, or a system call to curl).
roperators 1.3.0
- added
seq_around()for evenly spaced sequences around an origin point - Cleaned up roxygen comments, DESCRIPTION, and NAMESPACE files.
- Added a
NEWS.mdfile to track changes to the package. - New complete cases functions (
length_cc(),min_cc(),max_cc(),range_cc(),all_cc(),any_cc(),sum_cc(),prod_cc(),mean_cc(),median_cc(),var_cc(),cov_cc(),cor_cc(),sd_cc(),weighted.mean_cc(),quantile_cc(),IQR_cc(),mad_cc(),rowSums_cc(),colSums_cc(),rowMeans_cc(),colMeans_cc()) that set default argument to standard base/stats functions for only calculating on complete cases. - New
get_os(),is.os_mac,is.os_win,is.os_lnx, andis.os_unxhelper functions to quickly determine operating system. - New
is_txt_file(),is_csv_file(),is_excel_file(),is_r_file(),is_rdata_file(),is_rda_file(),is_spss_file(), andcheck_ext_against()functions to quickly determine if file has specific file extensions. - New
is.R_Revo()andis.RStudio()functions to determine whether Revolution R and RStudio are installed. - New
n_unique()function to count unique items andn_unique_cc()version for complete cases. - New
is.constant()andis.binary()functions to indicate whether a vector is constant (contains only ONE value type, ignoring NA) or binary (contains at most TWO value types, ignoring NA). - New
get_most_frequent()function to get most frequent thing(s) in x. - New
get_most_frequent_word()function to get most frequent word from string. - New
get_nth_word()function to get nth word from string - New
as.class()pipe-able function for arbitrary class conversions - New
paste_()is the same aspaste0but uses an underscore to separate - New
cat0()is analogous topaste0but for cat - New
catN()is the same ascat0but automatically inserts a new line after the cat - New
paste_series()paste a series of things with a conjunction - New
paste_oxford()shortcut forpaste_seriesas oxford comma