Learn R Programming

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

swfscMisc

Description

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.

Installation

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')

Contact

Current functions

  • Geodesic functions:

    • bearing
    • datum
    • distance
    • circle.polygon
    • convert.angle
    • convert.distance
  • Mapping functions:

    • lat.lon.axes
    • sample.map
  • Plotting functions:

    • braces
    • catSpatInterp Categorical Spatial Interpolation
    • color.name
    • lab.wid
    • row.col.page.fit
    • scatterdens
    • scatterhist
    • sex.symbols
  • Miscellaneous functions:

    • affin.prop
    • box.area
    • central.quantile
    • copy.tri
    • crossing.point
    • diversity
    • distSmry
    • fisher.p
    • geometric.mean
    • harmonic.mean
    • isBetween
    • na.count
    • odds conversion (odds, invOdds, logOdds, invLogOdds)
    • one.arg
    • plotAssignments
    • pVal
    • ceiling, floor, trunc, round (.data.frame)
    • uniform.test
    • setupClusters
    • sn.params
    • which.nearest
    • zero.pad

version 1.6 (devel)

  • reset setupClusters to choose correct function for OS
  • added perpDist() and perpPt()
  • added distSmry()
  • added sn.params functions for computing skew normal parameters and moments

version 1.5 (on CRAN)

  • removed das.* functions

version 1.4

  • added catSpatInterp for Categorical Spatial Interpolation (based on code by Timo Grossenbacher)
  • begin deprecation of das.* functions. to be removed in v1.5.
  • change destination() to accept vectors and return a matrix.
  • fixed plotAssignments() to not change class names.
  • updated spatstat import

version 1.3

  • fixed plotAssignments to use facets and removed grids and space around panels
  • added setupClusters

version 1.2

  • Added rounding functions for data.frames.
  • Removed NEWS.md - changelog moved to README.md
  • Added plotAssignments function.

version 1.1

  • Added autoUnits function
  • Changed default arguments for lat.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.

version 1.0.9

  • Added transparent function
  • Changed distance and destination functions to accept partial matches for method

of calculation, type of surface, and units

version 1.0.8

  • Fixed das.read to handle errors in position and suppress warnings about NAs

during numerical conversions.

  • Fixed das.map to remove records with no position

version 1.0.7

  • Changed isBetween to accept a vector of numbers

version 1.0.6

  • Added NEWS.md
  • Added diversity function (moved from strataG package)
  • Added isBetween function to test if a number is between two numbers

Copy Link

Version

Install

install.packages('swfscMisc')

Monthly Downloads

2,547

Version

1.6

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Eric Archer

Last Published

April 21st, 2022

Functions in swfscMisc (1.6)

crossing.point

Crossing Point
one.arg

One Argument
sn.params

Skew-Normal parameter computation
diversity

Unbiased Estimate of Diversity
pVal

Permutation Test P-value
distance

Distance Between Coordinates
sex.symbols

Sex Symbols
na.count

Count NAs
odds

Odds Conversion
circle.polygon

Circle Polygon (on Earth)
datum

Datum
stouffer.p

Stouffer's Method p-value
perpPoint

Perpendicular Point
distSmry

Distribution summary
destination

Destination on Sphere or Ellipsoid
perpDist

Perpendicular Distance
swfscMisc

swfscMisc package
harmonic.mean

Harmonic Mean
round

Rounding Numbers for Data Frames
ggBiplot

ggBiplot
weighted.fisher.p

Weighted Fisher's Method p-value
plotAssignments

Plot assignment distributions
which.nearest

Which Nearest
copy.tri

Copy Matrix Triangles
convert.distance

Distance Conversion
isBetween

Between
scatterdens

Scatter Plot with Density Margins
row.col.page.fit

Number of Rows and Columns on Page
lab.wid

Label Width
fisher.p

Fisher's Method p-value
lat.lon.axes

Latitude and Longitude axes
geometric.mean

Geometric Mean
zero.pad

Zero Pad Integers
setupClusters

Setup Clusters
transparent

Transparent Colors
month2Season

Convert Months to Seasons
uniform.test

Uniform Distribution Test
sample.map

Plot Samples on World Map
convert.angle

Angle Conversion
autoUnits

Auto Time Interval Units
catSpatInterp

Categorical Spatial Interpolation
affin.prop

Affinity Propagation
bearing

Calculate Bearing Between Two Positions
central.quantile

Central Quantile
color.name

Color Name
braces

Braces
box.area

Area of a Box