Man pages for DesiQuintans/desiderata
Assorted utility functions

add_group_sizeAdd a 'group size' column to a dataframe
align_titlesHorizontally align ggplot2 title and subtitle
apply_to_filesApply a function to every file in a folder that matches a...
basic_colour_namesThe names of 197 common colours
build_paletteBuild a palette of colours from a list of hex codes
cat_wrapPrint to console, wrapping the text to a specific line width
clippyCopy a dataframe, vector, or the result of an expression to...
coinflipRandomly return TRUE or FALSE
col2hsvConvert Hex colours to HSV
collapse_dfCollapse a dataframe into a vector
collapse_vecCollapse a vector into a string
common_stemReturn the stem that is common to a set of strings
concat_numsConcatenate numbers together
consecutive_monthFind the current month number relative to a starting date
construct_colsSubset dataframe columns
count_uniqueCount how many times each unique element in a vector is...
cumpctCumulative percentage
degreedaysCalculate degree-days
dendroMake a dendrogram
desideratadesiderata - A pack of personal functions
dots_charConvert dots (...) to a character vector or a string
drop_empty_colsDrop 'empty' columns in a dataframe
drop_empty_rowsDrop 'empty' rows in a dataframe
drop_invar_colsDrop invariant columns from a dataframe
encode_signifReplace p-values with significance codes
find_dimsFind the nearest rectangle that will fit the number of...
geomeanGeometric mean of a vector
howmanyCount the number of unique values
if_naReturn a value or expression if something is NA
interleaveInterleave one string with another
IQR_outliersMark outliers using the 1.5 * IQR method
is.primeCheck if an integer is a prime number
loadRDSLoad an RDS file and announce when it was created
make_pathBuild a path, creating subfolders if needed
mark_last_peakMark the location of the last maximum value in a vector
mark_longest_runFind and mark the longest run of TRUEs in a boolean vector
mirror_matrixMirror a matrix horizontally
ModeMode of a vector (numeric/character/factor)
na_rmRemove NAs from vectors, lists, matrices, and dataframes
normalize_colwiseNormalise a matrix column-wise between 0 and 1
normalize_wholeNormalise a whole matrix or vector between 0 and 1
notinInverse match
nth_wordGet the nth word from a vector of strings
overwrite_dfReplace all matching values in a dataframe with something...
pctinPercentage of matching elements between two vectors
percentileQuick percentile overview
plot_arrangeArrange base R plots on a grid
quick_lmFit and plot a two-term linear model quickly
random_integers10,000 random integers between 0 and 100
rcols_as_hexConvert R's built-in named colours to hex codes
rev_sentenceReverse the order of words in a string
rotate_axis_textRotate and align ggplot2 axis tick labels
rotate_facet_textRotate and align ggplot2 facet labels
round_to_nearestRound numbers to a nearest "pretty" value
se_meanStandard error of the mean
set_seed_anySeed the random number generator with a character string (or...
ShowPipeline- and knit-friendly 'View()'
show_coloursPreview a list of colours as a grid
shushSuppress all console printing (cat, print, warning, message)
sort_colsSort columns in a dataframe
split_nSplit a vector into n groups
str_revReverse every element of a vector
theme_desi_baseMy personally-preferred minimal base plot theme
top_tailFirst and last rows of a dataframe
try.seedGenerate random seeds to preview their effects
unique_nKeep the first n unique elements in a vector
uw'Unwrap' strings by ignoring hard-wrapping from the source...
vec_to_regexCollapse vectors into a regex pattern
DesiQuintans/desiderata documentation built on Dec. 11, 2019, 6 p.m.