Learn R Programming

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

cwhmisc (version 2.1)

CWH's functions for maths, plotting, printing, statistics, strings, and tools

Description

Miscellaneous useful functions collected over time

Copy Link

Version

Install

install.packages('cwhmisc')

Monthly Downloads

110

Version

2.1

License

GPL (>= 2)

Maintainer

Christian Hoffmann

Last Published

April 15th, 2010

Functions in cwhmisc (2.1)

dt2str

Convert time difference to string.
libs

List all installed packages, or all functions in a package
normalize

Normalize vectors
poisgam

Poisson Gamma Distribution
n22dig

Show vector or matrix (of 0 <= x <=1) in a compact way
remove.dup.rows

Remove duplicate rows
rtf

Rational Transfer Function objects for R
lengths.angle

Lengths of two vectors and angle between them.
jitterNA

Jitter entities with NA
rotm

Rotation matrices and compute rotation angles from orthogonal matrix
qres

Randomized quantile residuals
is.constant

is.constant
replacechar

Replace a character in a string by another
select.range

Select values from a vector depending on a range in a second vector.
delstr

Delete a substring from a string
smoothed.df

Fit cumulative distribution from kernel estimate.
lowess.bygroup

Plot data in groups, each with lowess or loess smoothing
numberof

Count the number elements that satisfy a condition.
heading

Write a line of text with underlining and blank lines
printP

Print without square brackets, expression values together with their call strings
n2c

Show absolute values as characters, prepare for plotting
mult.fig.p

Plot Setup for MULTiple FIGures, incl. Main Title
str2formula

Extract sides of a formula to strings, Convert back to a formula
seqm

sequences, empty if "by" not conforming
tri

Ternary or Triangular Plots.
adaptlob

Numerically evaluate integral using adaptive rule.
cpos

Find the position of a substring
shapiro.wilk.test

Shapiro-Wilk Normality Test
strmatch

A "shortest unique identifier" match.
weighted.mean1

Weighted mean1
padding

Padding a string with justification
formatFix

Format to a fixed format representation
eql

Check on equality, including NA==NA and NaN==NaN.
ls.functions

List available functions
pointfit

Least squares fit of point clouds, or the Procrustes problem.
negbingof

Approximate a Negative binomial distribution.
invgauss

Inverse Gaussian Distribution
qnorm.appr

Approximation to the inverse normal distribution function.
clean.na

Clean a matrix or data frame of rows or columns of containing NA.
lpr

Print an object or plot
weighted.median

Weighted median
delayt

Waiting loop for program execution
cap

Change case of strings
persp2

Central perspective from 3 to 2 dimensions along specified axis
numericString

Test string for being a number or made up of digits only, convert to bases.
T3plot

T3plot
like

Prepare new data for prediction
num2Latex

Convert numeric containing e+-power
my.table

Tabulate data, with extra rows and columns.
FinneyCorr

Finney's correction to log normally distributed data, r-squared and standard deviation of a linear model.
f.log

Determine an optimized offset s and return log10(data+s).
whole.number

Check an array on whole numbers (x in I).
waitReturn

Wait for
ellipse

Generate ellipses
pasteInfix

Paste(infix)
signp

Sign Function
scode

Generate the significance codes as in summary.lm
summaryFs

Print extended summary of lm.
setPowerPointStyle

Set PowerPoint style
panel

Alternative panel functions for lattice plots
tex.table

Convert a data matrix into LaTeX code.
dc

Convert number for table columns, for equations
cwhmisc-internal

Internal cwhmisc functions
num.ident

Check numerical values for identity
progress.meter

Monitor the progress of a repetitive calculation.
my.var

Correlation, Variance and Covariance (Matrices)
p.screeplot.princomp

Plot screeplot
datetime

Show date and time in ISO format
plotSymbols

Plot symbols, colours, and allow to choose
rec.prot

Protected division
cbind.colnames

Add columns to a data frame, using variable names.
napply

Apply a function to the corresponding elements of two lists (?)
pasteRound

Paste rounded values
frac

Fractional part of number
plt

Plot depending on switch, Create multiple plots with title and time stamp