Learn R Programming

broman (version 0.84)

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

2,713

Version

0.84

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

May 18th, 2024

Functions in broman (0.84)

lenuniq

Number of unique values
make

Run make within a package directory
paired.perm.test

Paired permutation t-test
maxabs

maximum of absolute value
dotplot

Dot chart with a gray background
numbers

Numbers spelled out in English
openfile

Open a file
manyboxplot

Boxplot-like figure for many groups
objectsizes

Calculate sizes of all objects in workspace
paste.

paste with dot separator
histlines

Utility to create line-based histogram
rmvn

Simulate multivariate normal
revgray

Create vector of colors from white to black
qr2

The QR decomposition of a matrix
paste00

paste with null or dot as separator and with collapse
jiggle

Jiggle points horizontally
strwidth2lines

Calculate width of a character string in number of lines
hex2dec

Convert from hex to decimal
runningmean

Running mean, sum, or median
h

View html version of help file
revrainbow

Create vector of colors from blue to red
quantileSE

Sample quantiles and their standard errors
grayplot_na

Scatterplot with missing values indicated
plot_crayons

Illustration of crayon colors
kbdate

My little date facility
runningratio

Running ratio
myround

Round a number, preserving extra 0's
trilines

Plot lines within a Holmans triangle
pick_more_precise

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

Value matching
normalize

Quantile normalization
setRNGparallel

Set up random number generation for parallel calculations
qqline2

qqline for qqplot
mypairs

My scatterplot matrix
triarrow

Plot an arrow within a Holmans triangle
strwidth2xlim

Calculate horizontal limit in user coordinates for adding labels
spell_out

Spell out an integer
winsorize

Winsorize a vector
perm.test

Permutation t-test
simp

Numerical integration
venn

Plot to-scale Venn diagram
timeplot

Scatterplot with date/times on the x-axis
time_axis

Set up a time-based axis
triplot

Plot Holmans triangle
twocolorpal

Create vector of colors from blue to white to red
switchv

Vectorized version of switch
theme_karl

Karl's ggplot2 theme
xlimlabel

Calulate horizontal limit in user coordinates for adding labels
vec2string

Turn a vector into a single character string
tripoints

Plot points within a Holmans triangle
tritext

Plot text within a Holmans triangle
trigrid

Add grid lines to triplot
align_vectors

Align two vectors
cf

Compare objects, including missing data pattern
add_commas

Add commas to a large number
get_precision

Determine the precision of a number
fac2num

Convert a factor to numeric
compare_rows

Compare rows in a matrix
chisq

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

Get names of attributes
bromanversion

Installed version of R/broman
ciplot

Effect plot with multiple CIs for different groups
convert2hex

Convert decimal to hex
crayons

Crayon colors
colwalpha

Convert a color to use alpha transparency
arrowlocator

Use the locator function to plot an arrow
fisher

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

Vectors of colors for figures
grayplot

Scatterplot with a gray background
excel_fig

Excel-style figure displaying contents of a matrix
exit

exit R without saving