The MQMF package Provides R functions for use with the new book: (Using R for Modelling and Quantitative Methods in Fisheries), being published by CRC Press / Chapman & Hall in their (Using R) series. Currently no vignettes are included but all examples from the chapters are included as help pages for functions. Try ?chapter2, ?chapter3, ..., ?chapter7, which will provide a listing of all the code chunks included in the book (and some that are not). The list of functions below is not complete so scroll to the bottom of any help file and click the link to the index of functions instead. A development version is available on GitHub at github.com/haddonm/MQMF.
used in apply to count the ones in a vector
used in apply to count the zeros in a vector
halves the height of a tall narrow data.frame
used in apply to count the NAs in a vector
used in apply to count the numbers > 1 in a vector
calculates the mean and st dev count data
find the minimum of a series to help with ylim or xlim
find the maximum of a series to help with ylim or xlim
extracts the name of a variable as character
subdivides a table to make it shorter and wider
defines the relative size of parameters for use when using nlm or optim without log-transforming the parameters
simplifies combining a name with a vector of numbers for use as a label or a legend entry
prints a pretty version of the results from optim, nlm, or nlminb
prints a vector of numbers vertically rather than horizontally
used in 'apply' to estimate quantiles across a vector
finds the value in a vector closest to a given value.
fits a normal distribution to the output from hist
fits a log-normal distribution to output from hist
plots a histogram of integer values more precisely than hist.
defines the par statement for a single plot
types the standard syntax for the par command to the console
simplifies the plotting of two variables in a single plot
Sets up a window and the par values for a plot. it checks to see if a graphics device is open and opens a new one if not. This is simply a utility function to save typing the standard syntax. Some of the defaults can be changed. Typing the name without () will provide a template for modification. If 'windows' is called repeatedly this will generate a new active graphics device each time leaving the older ones inactive but present. For quick exploratory plots this behaviour is not wanted, hence the check if an active device exists already or not.
returns a vector cbinded to 1:length(invect), which effectively prints the numbers vertically
prints a listing of the properties of the column variables within a data.frame
Haddon, M. (2020) Using R for Modelling and Quantitative Methods in Fisheries, CRC Press / Chapman & Hall/ Boca Raton 337p. ISBN: 9780367469894