Miscellaneous utility functions for data manipulation, data tidying, and working with gene expression data.
This is primarily a cleanup release. Several functions were included in the Tmisc package early on while packages such as janitor were in development. This release removes (note, removes, doesn't deprecate) functions that were previously copied from other packages, introducing a few potentially breaking changes.
set_names()as this is exported from rlang.
beep(). Use the beepr package instead.
remove_empty(), etc., from the janitor package instead.
magrittr::set_rownames()(loaded with tidyverse).
=. Optionally map the keyboard shortcut to Alt+
=instead of the traditional
%nin%, but where the second argument is a regular expression to match.
gt2refalt()creates a two-letter genotype from a GT field from a VCF file.
mat2df()creates a pairwise distance data frame from a square matrix.
keep_top_n()thanks to Jeroen Janssens.
deseqresult2tbl()now lets you name the column extracted from the DESeq result's
rownamesanything you want.
Cs()(from Hmisc): Convenience function to create a quoted character vector from unquoted strings.
convert_to_NA()converts string values to true
NAvalues (adapted from sfirke/janitor)
clean_names()cleans up the names in a data frame. Resulting names are unique and consist only of the
_character, lowercase letters, and numbers (taken from sfirke/janitor).
remove_empty_cols()removes any rows or columns composed entirely of
NAvalues (taken from sfirke/janitor).
Tpairs()displays better pairwise scatterplot matrices than
Thist()plots a histogram with either a normal distribution or density plot overlay.
corner()displays the first few rows and columns of a data frame or matrix.
beep()plays a short beep to alert when something's done (from the beepr package).
jsd()compute the Jensen-Shannon divergence from a matrix of probabilities.
Mode()returns the mode of a vector.
gg_na()produces a plot showing the missing values in a data frame.
are_all_equal()assess whether all the components of a numeric vector are (approximately) equal.
gghues()generates color palette emulating ggplot2's default hues.
fisherp()uses Fisher's method to combine p-values.
dokuwiki()will convert a data.frame to a dokuwiki-formatted table, and will copy said table to the system clipboard if you're on Mac OS X.
strSort()alphabetically sorts characters in a string.