Useful functions in R.

For more information on each function click here.  
For source code for each function click here.  
   
Functions for data manipulation and statistical analysis
arraymax: find the maximum value in an array and the associated dim names
arraymin: find the minimum value in an array and the associated dim names
bcount: perform a Boolean count on a vector, i.e., count the number of TRUEs in the vector.
calcsignifr: Calculate what value of |r| is significant at the alpha level given the sample size n
combinep: combine the p-values from a series of independent hypothesis tests to get an overall significance level. See Sokal and Rohlf, 1981. Biometry, 2nd, ed. p.780.
combinevar: combine k estimates of the sample variance. This is useful in Monte Carlo simulations where one may wish to run additional simulations to guarantee adequate precision. This function allows one to combine the estimates of sample variance without having to recalculate the squared deviations.
cumavg: compute the cumulative mean of the elements of a vector. This is useful for monitoring how estimates from a Monte Carlo simulation are converging as the number of simulations increases. (See also cumvar and updatevar.)
cumvar: compute the mean and variance of the first n, 2n, 3n, … observations in a vector as well as for all of the elements of a vector. This is useful for monitoring how results from a Monte Carlo simulation are converging as the number of simulations increases. (See also cumavg and updatevar.)
dnelement: Get dimnames corresponding to the n'th element of a vector which is also an array filled columnwise with the vector. This function is called by arraymin() and arraymax() which are available on this site.
gmean: compute the geometric mean of the elements of a vector.
is.even: determine if each element of a vector is even (TRUE) or odd (FALSE)
is.odd: determine if each element of a vector is odd (TRUE) or even (FALSE)
myprop.table: calculate row or column proportions or proportions of the grand total. This is a more general version of prop.table() in the base R package because it provides the option of removing NAs from the object being summarized before calculating the proportions.
same: tests whether two vectors are exactly the same.
tabcounts: sort the unique values in a vector and return a count of the number of occurrences of each value.
updatevar: updates the sample variance given the mean, variance, and sample size of a sample and a vector of additional observations. That is, it is not necessary to have the individual observations from the first sample in order to update the variance given additional observations. (See also cumavg and cumvar.)

Functions for graphing.
ellipse: compute (x,y) pairs for plotting an ellipse.
regpolygon: compute (x,y) pairs that define the vertices of a regular polygon with number of sides specified by the user
rotate: rotate (x,y) coordinates counterclockwise through an angle to obtain new coordinates (x',y')

Functions for fisheries assessments.
calcFishMort: calculate the instantaneous rate of fishing mortality given the exploitation rate, u, and natural mortality rate, M.
M.Pauly: Compute Pauly's empirical estimate of natural mortality rate, M, given von Bertalanffy growth parameters and mean water temperature.
plotagecomparisons: plots age readings from 3 readers (or from 3 methods of processing the hard part) on a hexagon. This allows one to check if the 3 readers (or 3 methods) are interchangeable. In this way one can check if "odd man out" tends to be higher or tends to be lower than the other readers.
ya2yc: convert a table with rows denoting years and columns denoting age of fish to one where the rows denote year and the columns denote cohort. This can be useful for virtual population analysis and other longitudinal studies of populations
Z.Hoenig compute an estimate of mortality rate given the maximum known age or, optionally, given the maximum age, the minimum age fully sampled, and the sample size.