Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


⚠️There's a newer version (0.84) of this package.Take me there.

broman (version 0.80)

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,456

Version

0.80

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

July 8th, 2022

Functions in broman (0.80)

attrnames

Get names of attributes
exit

exit R without saving
excel_fig

Excel-style figure displaying contents of a matrix
crayons

Crayon colors
dotplot

Dot chart with a gray background
make

Run make within a package directory
lenuniq

Number of unique values
compare_rows

Compare rows in a matrix
hex2dec

Convert from hex to decimal
convert2hex

Convert decimal to hex
histlines

Utility to create line-based histogram
%nin%

Value matching
normalize

Quantile normalization
jiggle

Jiggle points horizontally
paste00

paste with null or dot as separator and with collapse
h

View html version of help file
grayplot_na

Scatterplot with missing values indicated
paste.

paste with dot separator
get_precision

Determine the precision of a number
qqline2

qqline for qqplot
plot_crayons

Illustration of crayon colors
numbers

Numbers spelled out in English
fisher

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

Convert a factor to numeric
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
kbdate

My little date facility
objectsizes

Calculate sizes of all objects in workspace
grayplot

Scatterplot with a gray background
pick_more_precise

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

Permutation t-test
switchv

Vectorized version of switch
theme_karl

Karl's ggplot2 theme
maxabs

maximum of absolute value
triarrow

Plot an arrow within a Holmans triangle
trigrid

Add grid lines to triplot
venn

Plot to-scale Venn diagram
openfile

Open a file
winsorize

Winsorize a vector
paired.perm.test

Paired permutation t-test
rmvn

Simulate multivariate normal
runningratio

Running ratio
runningmean

Running mean, sum, or median
setRNGparallel

Set up random number generation for parallel calculations
qr2

The QR decomposition of a matrix
quantileSE

Sample quantiles and their standard errors
strwidth2lines

Calculate width of a character string in number of lines
strwidth2xlim

Calculate horizontal limit in user coordinates for adding labels
trilines

Plot lines within a Holmans triangle
xlimlabel

Calulate horizontal limit in user coordinates for adding labels
myround

Round a number, preserving extra 0's
mypairs

My scatterplot matrix
triplot

Plot Holmans triangle
tripoints

Plot points within a Holmans triangle
tritext

Plot text within a Holmans triangle
spell_out

Spell out an integer
simp

Numerical integration
vec2string

Turn a vector into a single character string
twocolorpal

Create vector of colors from blue to white to red
bromanversion

Installed version of R/broman
align_vectors

Align two vectors
add_commas

Add commas to a large number
cf

Compare objects, including missing data pattern
colwalpha

Convert a color to use alpha transparency
arrowlocator

Use the locator function to plot an arrow
ciplot

Effect plot with multiple CIs for different groups
brocolors

Vectors of colors for figures
chisq

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