add_group_size | Add a 'group size' column to a dataframe |
align_titles | Horizontally align ggplot2 title and subtitle |
anyFalse | Alias for 'any(!(...))' |
apply_to_files | Apply a function to every file in a folder that matches a... |
assign_groups | Assign elements in a vector to groups |
basic_colour_names | The names of 197 common colours |
boot_ci_mean | Bootstrapped confidence interval of the mean |
build_palette | Build a palette of colours from a list of hex codes |
cat_wrap | Print to console, wrapping the text to a specific line width |
clippy | Copy a dataframe, vector, or the result of an expression to... |
coinflip | Randomly return TRUE or FALSE |
col2hsv | Convert Hex colours to HSV |
collapse_df | Collapse a dataframe into a vector |
common_stem | Return the stem that is common to a set of strings |
concat_nums | Concatenate numbers together |
consecutive_month | Find the current month number relative to a starting date |
consecutive_week | Find the number of weeks between two dates |
construct_cols | Subset dataframe columns |
count_unique | Count how many times each unique element in a vector is... |
cumpct | Cumulative percentage |
cut_int | Cuts for dividing an integer into 'n' chunks |
degreedays | Calculate degree-days |
dendro | Make a dendrogram |
desiderata | desiderata - A pack of personal functions |
diff_cols | Given two dataframes, which columns are present in one but... |
dots_char | Convert dots (...) to a character vector or a string |
drop_empty_cols | Drop 'empty' columns in a dataframe |
drop_empty_rows | Drop 'empty' rows in a dataframe |
drop_invar_cols | Drop invariant columns from a dataframe |
encode_signif | Replace p-values with significance codes |
ensure | Quick assertion function for sanity checking your code |
find_dims | Find the nearest rectangle that will fit the number of... |
fold | Friendly printing of a multi-element vector |
geomean | Geometric mean of a vector |
howmany | Count the number of unique values |
if_na | Return a value or expression if something is NA |
instant_runoff_voting | Instant run-off voting |
interleave | Interleave one string with another |
IQR_outliers | Mark outliers using the 1.5 * IQR method |
iris_labelled | The classic Iris dataset, with variable labels |
is.flanked | Is a vector element surrounded by certain values? |
is.prime | Check if an integer is a prime number |
keep_every | Keep every other element of a vector, flexibly |
loadRDS | Load an RDS file and announce when it was created |
make_path | Build a path, creating subfolders if needed |
mark_last_peak | Mark the location of the last maximum value in a vector |
mark_longest_run | Find and mark the longest run of TRUEs in a boolean vector |
match_in_substr | Match strings that have a needle near the start, end, or... |
material2014_colblind | Google Material Design 2014 palette, with colour-blind... |
mirror_matrix | Mirror a matrix horizontally |
Mode | Mode of a vector (numeric/character/factor) |
na_in_row | Count/proportion of 'NA's and not-'NA's per dataframe row |
na_rm | Remove NAs from vectors, lists, matrices, and dataframes |
normalize_colwise | Normalise a matrix column-wise between 0 and 1 |
normalize_whole | Normalise a whole matrix or vector between 0 and 1 |
notin | Inverse match |
not.na | Opposite of 'is.na()' |
not.nan | Opposite of 'is.nan()' |
nz_boty_2019_head | The first 1000 voters from the New Zealand Bird of the Year... |
omit_dips | Replace element with NA if it is less than the elements... |
overwrite_df | Replace all matching values in a dataframe with something... |
pctin | Percentage of matching elements between two vectors |
percentile | Quick percentile overview |
plot_arrange | Arrange base R plots on a grid |
quick_lm | Fit and plot a two-term linear model quickly |
random_integers | 10,000 random integers between 0 and 100 |
rcols_as_hex | Convert R's built-in named colours to hex codes |
report_diff | Report pairwise differences between two vectors |
rev_sentence | Reverse the order of words in a string |
rotate_axis_text | Rotate and align ggplot2 axis tick labels |
rotate_facet_text | Rotate and align ggplot2 facet labels |
round_to | Round numbers to a fixed number of decimal places |
round_to_duration | Round a duration of days to other units |
round_to_nearest | Round numbers to a nearest "pretty" value |
rows_with_na | Only keep rows that contain NA |
same_cols | Given two dataframes, which columns appear in both of them? |
save_a4 | Save a ggplot as an A4 image |
se_mean | Standard error of the mean |
set_seed_any | Seed the random number generator with a character string (or... |
Show | Pipeline- and knit-friendly 'View()' |
show_colours | Preview a list of colours as a grid |
shush | Suppress all console printing (cat, print, warning, message) |
sort_cols | Sort columns in a dataframe |
split_size | Split a vector into chunks of size 'n' |
str_coll | Collapse a vector into a string |
str_rev | Reverse every element of a vector |
theme_desi_base | My personally-preferred minimal base plot theme |
top_tail | First and last rows of a dataframe |
triangle_num | nth Triangle Number (like factorial but with addition) |
try.seed | Generate random seeds to preview their effects |
unique_n | Keep the first n unique elements in a vector |
uw | 'Unwrap' strings by ignoring hard-wrapping from the source... |
vec_to_regex | Collapse vectors into a regex pattern |
write_csv_rds | Write a dataframe to a CSV and RDS |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.