broman0.90 package

Karl Broman's R Code

add_commas

Add commas to a large number

align_vectors

Align two vectors

arrowlocator

Use the locator function to plot an arrow

attrnames

Get names of attributes

brocolors

Vectors of colors for figures

bromanversion

Installed version of R/broman

cf

Compare objects, including missing data pattern

chisq

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

ciplot

Effect plot with multiple CIs for different groups

colwalpha

Convert a color to use alpha transparency

compare_rows

Compare rows in a matrix

convert2hex

Convert decimal to hex

crayons

Crayon colors

dotplot

Dot chart with a gray background

excel_fig

Excel-style figure displaying contents of a matrix

exit

exit R without saving

fac2num

Convert a factor to numeric

fisher

Fisher's exact test for a two-way table

get_precision

Determine the precision of a number

grayplot_na

Scatterplot with missing values indicated

grayplot

Scatterplot with a gray background

h

View html version of help file

hex2dec

Convert from hex to decimal

histlines

Utility to create line-based histogram

jiggle

Jiggle points horizontally

kbdate

My little date facility

lenuniq

Number of unique values

make

Run make within a package directory

manyboxplot

Boxplot-like figure for many groups

maxabs

maximum of absolute value

mypairs

My scatterplot matrix

myround

Round a number, preserving extra 0's

normalize

Quantile normalization

notin

Value matching

objectsizes

Calculate sizes of all objects in workspace

openfile

Open a file

paired.perm.test

Paired permutation t-test

paste.

paste with dot separator

paste00

paste with null or dot as separator and with collapse

perm.test

Permutation t-test

pick_more_precise

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

plot_crayons

Illustration of crayon colors

qqline2

qqline for qqplot

qr2

The QR decomposition of a matrix

quantileSE

Sample quantiles and their standard errors

revgray

Create vector of colors from white to black

revrainbow

Create vector of colors from blue to red

rmvn

Simulate multivariate normal

runningmean

Running mean, sum, or median

runningratio

Running ratio

runningratio2

Running ratio with adaptive window

setRNGparallel

Set up random number generation for parallel calculations

simp

Numerical integration

spell_out

Spell out an integer

strwidth2lines

Calculate width of a character string in number of lines

strwidth2xlim

Calculate horizontal limit in user coordinates for adding labels

switchv

Vectorized version of switch

theme_karl

Karl's ggplot2 theme

time_axis

Set up a time-based axis

timeplot

Scatterplot with date/times on the x-axis

triarrow

Plot an arrow within a Holmans triangle

trigrid

Add grid lines to triplot

trilines

Plot lines within a Holmans triangle

triplot

Plot Holmans triangle

tripoints

Plot points within a Holmans triangle

tritext

Plot text within a Holmans triangle

twocolorpal

Create vector of colors from blue to white to red

vec2string

Turn a vector into a single character string

venn

Plot to-scale Venn diagram

winsorize

Winsorize a vector

xlimlabel

Calulate horizontal limit in user coordinates for adding labels

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

  • Maintainer: Karl W Broman
  • License: GPL-3
  • Last published: 2025-10-10