Learn R Programming

broman (version 0.90)

Karl Broman's R Code

Description

Miscellaneous R functions, including functions related to graphics (mostly for base graphics), permutation tests, running mean/median, and general utilities.

Copy Link

Version

Install

install.packages('broman')

Monthly Downloads

10,375

Version

0.90

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Karl Broman

Last Published

October 10th, 2025

Functions in broman (0.90)

hex2dec

Convert from hex to decimal
jiggle

Jiggle points horizontally
numbers

Numbers spelled out in English
runningmean

Running mean, sum, or median
rmvn

Simulate multivariate normal
lenuniq

Number of unique values
make

Run make within a package directory
openfile

Open a file
quantileSE

Sample quantiles and their standard errors
paired.perm.test

Paired permutation t-test
histlines

Utility to create line-based histogram
qr2

The QR decomposition of a matrix
strwidth2xlim

Calculate horizontal limit in user coordinates for adding labels
switchv

Vectorized version of switch
exit

exit R without saving
normalize

Quantile normalization
grayplot_na

Scatterplot with missing values indicated
excel_fig

Excel-style figure displaying contents of a matrix
tritext

Plot text within a Holmans triangle
twocolorpal

Create vector of colors from blue to white to red
%nin%

Value matching
maxabs

maximum of absolute value
h

View html version of help file
manyboxplot

Boxplot-like figure for many groups
revgray

Create vector of colors from white to black
revrainbow

Create vector of colors from blue to red
paste.

paste with dot separator
paste00

paste with null or dot as separator and with collapse
plot_crayons

Illustration of crayon colors
objectsizes

Calculate sizes of all objects in workspace
simp

Numerical integration
qqline2

qqline for qqplot
setRNGparallel

Set up random number generation for parallel calculations
timeplot

Scatterplot with date/times on the x-axis
triplot

Plot Holmans triangle
runningratio2

Running ratio with adaptive window
runningratio

Running ratio
spell_out

Spell out an integer
strwidth2lines

Calculate width of a character string in number of lines
trigrid

Add grid lines to triplot
kbdate

My little date facility
myround

Round a number, preserving extra 0's
mypairs

My scatterplot matrix
tripoints

Plot points within a Holmans triangle
triarrow

Plot an arrow within a Holmans triangle
pick_more_precise

Pick the more precise value for each element in two related vectors
vec2string

Turn a vector into a single character string
time_axis

Set up a time-based axis
venn

Plot to-scale Venn diagram
theme_karl

Karl's ggplot2 theme
trilines

Plot lines within a Holmans triangle
perm.test

Permutation t-test
winsorize

Winsorize a vector
xlimlabel

Calulate horizontal limit in user coordinates for adding labels
arrowlocator

Use the locator function to plot an arrow
align_vectors

Align two vectors
add_commas

Add commas to a large number
get_precision

Determine the precision of a number
fac2num

Convert a factor to numeric
grayplot

Scatterplot with a gray background
colwalpha

Convert a color to use alpha transparency
bromanversion

Installed version of R/broman
crayons

Crayon colors
dotplot

Dot chart with a gray background
brocolors

Vectors of colors for figures
attrnames

Get names of attributes
fisher

Fisher's exact test for a two-way table
compare_rows

Compare rows in a matrix
ciplot

Effect plot with multiple CIs for different groups
cf

Compare objects, including missing data pattern
convert2hex

Convert decimal to hex
chisq

Chi-square test by simulation for a two-way table