A collection of documented, tested, and packaged helper functions.
devtools::install_github("vpnagraj/yawp", branch = "main", build_vignettes = TRUE)
Note that the install command above will install the package from GitHub
and build vignettes. If you would prefer not to build vignettes upon
install then set build_vignettes = FALSE
, which is the default in
devtools::install_github()
.
betwixt()
: Find values between lower and upper bounds of a rangebound()
: Bound a vectorf1()
: Calculate F1 scorefirst_char()
: Extract the first character from a stringget_mode()
: Find the modegg_zoom()
: Zoom in on a ggplot2 plot (EXPERIMENTAL)mav()
: Calculate moving averagemedf()
: Format medianmore()
: Add filler rows to a data framepropf()
: Calculate and format proportionread_repo()
: Read files directly from a GitHub repository
(EXPERIMENTAL)summary_se()
: Calculate mean and standard errortheme_mathbook()
: Custom “math book” ggplot2 themeThe function documentation includes examples of usage, as do the package vignettes:
browseVignettes(package = "yawp")
yawp
is a utility package, and the functionality it provides is by no
means unique. In fact, some of the functions were directly inspired by
other tools. For example:
betwixt()
builds on the concept originally implemented in the
between()
function in
dplyr but adds a feature
to ignore specific valuessummary_se()
re-implements summarySE()
from “The Cookbook for
R”
with tidy eval syntaxmav()
is available elsewhere,
including for example in slide()
from
sliderf1()
calculates the F1 score, other available functions such
as f_meas()
from
yardstick may
accommodate more generic applications (i.e. applying weights to
precision and recall)Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.