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 Southwest Fisheries Science Center in La Jolla, CA. The package contains functions for geodesic calculations, commonly used mapping functions, plotting special symbols, interacting with DAS sighting data generated by the line-transect survey data entry program WinCruz, 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 Rtools 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
  • DAS file functions:

    • das.map
    • das.merge.acoustic
    • das.read
    • das.spp.freq
  • Mapping functions:

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

    • braces
    • 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
    • fisher.method.p
    • geometric.mean
    • harmonic.mean
    • isBetween
    • na.count
    • normalize
    • odds conversion (odds, invOdds, logOdds, invLogOdds)
    • one.arg
    • plotAssignments
    • pVal
    • ceiling, floor, trunc, round (.data.frame)
    • uniform.test
    • which.nearest
    • zero.pad

version 1.2 (current on GitHub)

  • 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.2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Eric Archer

Last Published

August 23rd, 2016

Functions in swfscMisc (1.2)

affin.prop

Affinity Propagation
braces

Braces
destination

Destination on Sphere or Ellipsoid
central.quantile

Central Quantile
datum

Datum
geometric.mean

Geometric Mean
fisher.method.p

Fisher's Method p-value
na.count

Count NAs
diversity

Unbiased Estimate of Diversity
distance

Distance Between Coordinates
normalize

Normalize a Numeric Vector
box.area

Area of a Box
bearing

Calculate Bearing Between Two Positions
lab.wid

Label Width
plotAssignments

Plot assignment distributions
lat.lon.axes

Latitude and Longitude axes
pVal

Permutation Test P-value
zero.pad

Zero Pad Integers
round

Rounding Numbers for Data Frames
row.col.page.fit

Number of Rows and Columns on Page
copy.tri

Copy Matrix Triangles
harmonic.mean

Harmonic Mean
crossing.point

Crossing Point
isBetween

Between
transparent

Transparent Colors
sex.symbols

Sex Symbols
convert.angle

Angle Conversion
das.read

Read DAS File
convert.distance

Distance Conversion
das.spp.freq

Frequency of species from DAS file
uniform.test

Uniform Distribution Test
das.map

Map DAS
which.nearest

Which Nearest
das.merge.acoustic

Merge DAS Data Into Acoustic Detections
odds

Odds Conversion
one.arg

One Argument
sample.map

Plot Samples on World Map
circle.polygon

Circle Polygon (on Earth)
scatterdens

Scatter Plot with Density Margins
color.name

Color Name
autoUnits

Auto Time Interval Units