Karl Broman's R Code
Add commas to a large number
Align two vectors
Use the locator function to plot an arrow
Get names of attributes
Vectors of colors for figures
Installed version of R/broman
Compare objects, including missing data pattern
Chi-square test by simulation for a two-way table
Effect plot with multiple CIs for different groups
Convert a color to use alpha transparency
Compare rows in a matrix
Convert decimal to hex
Crayon colors
Dot chart with a gray background
Excel-style figure displaying contents of a matrix
exit R without saving
Convert a factor to numeric
Fisher's exact test for a two-way table
Determine the precision of a number
Scatterplot with missing values indicated
Scatterplot with a gray background
View html version of help file
Convert from hex to decimal
Utility to create line-based histogram
Jiggle points horizontally
My little date facility
Number of unique values
Run make within a package directory
Boxplot-like figure for many groups
maximum of absolute value
My scatterplot matrix
Round a number, preserving extra 0's
Quantile normalization
Value matching
Calculate sizes of all objects in workspace
Open a file
Paired permutation t-test
paste with dot separator
paste with null or dot as separator and with collapse
Permutation t-test
Pick the more precise value for each element in two related vectors
Illustration of crayon colors
qqline for qqplot
The QR decomposition of a matrix
Sample quantiles and their standard errors
Create vector of colors from white to black
Create vector of colors from blue to red
Simulate multivariate normal
Running mean, sum, or median
Running ratio
Running ratio with adaptive window
Set up random number generation for parallel calculations
Numerical integration
Spell out an integer
Calculate width of a character string in number of lines
Calculate horizontal limit in user coordinates for adding labels
Vectorized version of switch
Karl's ggplot2 theme
Set up a time-based axis
Scatterplot with date/times on the x-axis
Plot an arrow within a Holmans triangle
Add grid lines to triplot
Plot lines within a Holmans triangle
Plot Holmans triangle
Plot points within a Holmans triangle
Plot text within a Holmans triangle
Create vector of colors from blue to white to red
Turn a vector into a single character string
Plot to-scale Venn diagram
Winsorize a vector
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.