Learn R Programming

broman (version 0.94)

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

5,218

Version

0.94

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Karl Broman

Last Published

June 9th, 2026

Functions in broman (0.94)

h

View html version of help file
hex2dec

Convert from hex to decimal
grayplot

Scatterplot with a gray background
objectsizes

Calculate sizes of all objects in workspace
openfile

Open a file
jiggle

Jiggle points horizontally
fac2num

Convert a factor to numeric
histlines

Utility to create line-based histogram
broman-package

broman: Karl Broman's R Code
exit

exit R without saving
paired.perm.test

Paired permutation t-test
paste.

paste with dot separator
pick_more_precise

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

maximum of absolute value
get_precision

Determine the precision of a number
fisher

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

Excel-style figure displaying contents of a matrix
mypairs

My scatterplot matrix
manyboxplot

Boxplot-like figure for many groups
make

Run make within a package directory
plot_crayons

Illustration of crayon colors
runningratio2

Running ratio with adaptive window
perm.test

Permutation t-test
paste00

paste with null or dot as separator and with collapse
kbdate

My little date facility
theme_karl

Karl's ggplot2 theme
switchv

Vectorized version of switch
trilines

Plot lines within a Holmans triangle
runningmean

Running mean, sum, or median
runningratio

Running ratio
triplot

Plot Holmans triangle
setRNGparallel

Set up random number generation for parallel calculations
revrainbow

Create vector of colors from blue to red
tripoints

Plot points within a Holmans triangle
tritext

Plot text within a Holmans triangle
xlimlabel

Calulate horizontal limit in user coordinates for adding labels
%nin%

Value matching
quantileSE

Sample quantiles and their standard errors
rmvn

Simulate multivariate normal
lenuniq

Number of unique values
twocolorpal

Create vector of colors from blue to white to red
numbers

Numbers spelled out in English
revgray

Create vector of colors from white to black
grayplot_na

Scatterplot with missing values indicated
myround

Round a number, preserving extra 0's
qr2

The QR decomposition of a matrix
qqline2

qqline for qqplot
normalize

Quantile normalization
vec2string

Turn a vector into a single character string
strwidth2xlim

Calculate horizontal limit in user coordinates for adding labels
strwidth2lines

Calculate width of a character string in number of lines
trigrid

Add grid lines to triplot
triarrow

Plot an arrow within a Holmans triangle
simp

Numerical integration
timeplot

Scatterplot with date/times on the x-axis
venn

Plot to-scale Venn diagram
winsorize

Winsorize a vector
time_axis

Set up a time-based axis
spell_out

Spell out an integer
brocolors

Vectors of colors for figures
add_commas

Add commas to a large number
align_vectors

Align two vectors
compare_rows

Compare rows in a matrix
ciplot

Effect plot with multiple CIs for different groups
dotplot

Dot chart with a gray background
cf

Compare objects, including missing data pattern
chisq

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

Installed version of R/broman
arrowlocator

Use the locator function to plot an arrow
attrnames

Get names of attributes
convert2hex

Convert decimal to hex
crayons

Crayon colors
colwalpha

Convert a color to use alpha transparency