Collection of conversion, analytical, geodesic, mapping, and plotting functions. Used to support packages and code written by researchers at the Southwest Fisheries Science Center of the National Oceanic and Atmospheric Administration.
swfscMisc is a collection of utility functions used at the NOAA Southwest Fisheries Science Center in La Jolla, CA. The package contains functions for geodesic calculations, commonly used mapping functions, plotting special symbols, and miscellaneous analytical and conversion functions.
To install the stable version from CRAN:
install.packages('swfscMisc')
To install the latest version from GitHub:
# make sure you have devtools installed
if (!require('devtools')) install.packages('devtools')
# install from GitHub
devtools::install_github('ericarcher/swfscMisc')
Geodesic functions:
Plotting functions:
Distribution functions:
Miscellaneous functions:
ggplot2::aes_string() to ggplot2::aes()prcomp() output as well as princomp()modeest::mlv() to stats::density() in distSmry() because modeest is getting archived on CRANrunjags2list() if variable in monitor vector wasn't in modelbetaParams() and gammaParams()diversity() - now in sprex packagesample.map()imdo()intersectingPoint()modeest::mlv() to estimate mode in distSmry()pVal() to handle NA and NaN values correctlydiversity(). New function in sprex package.runjags2list() to format posterior samples from runjags::run.jags().perpDist() and perpPt()distSmry()sn.params functions for computing skew normal parameters and momentsdestination() to accept vectors and return a matrix.plotAssignments() to not change class names.plotAssignments function.autoUnits functionlat.range and lon.range to NULL in sample.map. If not specified, the ranges will be set to the ranges of the lat and lon.transparent functiondas.read to handle errors in position and suppress warnings about NAs
during numerical conversions.das.map to remove records with no positionisBetween to accept a vector of numbersdiversity function (moved from strataG package)isBetween function to test if a number is between two numbers