MyNixOS website logo
Description

Stream Network Movement Analyses.

Calculating home ranges and movements of animals in complex stream environments is often challenging, and standard home range estimators do not apply. This package provides a series of tools for assessing movements in a stream network, such as calculating the total length of stream used, distances between points, and movement patterns over time. See Vignette for additional details. This package was originally released on 'GitHub' under the name 'SNM'. SNMA was developed for analyses in McKnight et al. (2025) <doi:10.3354/esr01442> which contains additional examples and information.

Stream Network Movement (SNM)

An R package for analyzing animal movements in stream networks.

Description

This package provides basic functions for analyzing animal movement patterns in a stream network including calculating: space use over time, cumulative distance moved over time, distances between pairs of points, directionality of movement, and distances moved between points over varying intervals of time.

Installation

Copy and paste the code below to install the package

install.packages("devtools") #Installs devtools (if not already installed)
devtools::install_github("donaldtmcknight/SNM") #Installs SNM

Note that you may receive a warning about the retirement of packages such as sp and rgdal. The functions in SNM use current sf implementation and should not be an issue.

Running the package

Detailed information about the package functions, what they do, and how to run them are provided in the vignette (this should install with the package in R, but a .pdf version is also available on Github).

Briefly, use the prep.data() function to format the data for subsequent functions.

network.1 <- prep.data(l=stream.line,freq=1,nodes=nodes,lon.name="lon",lat.name="lat",node.name="id")

Use the movements() function to calculate space use, movement from previous points, cumulative distance moved, and directionality of movement.

movements(data=network.1,
          space.use=T,
          from.previous=T,
          cumulative=T,
          downstream.node=1,
          coords=animal.points,
          lon.name="lon.raw",
          lat.name="lat.raw",
          id.name="id",
          date.time.name="date.time")

Use the dist.over.time() function to calculate movement from previous points over varying time intervals

dist.over.time(data=network.1,
               coords=animal.points,
               lon.name="lon.raw",
               lat.name="lat.raw",
               id.name="id",
               date.time.name="date.time",
               units="days",
               time.diff=2,
               diff.max=NULL,
               sensitivity.min=0.1,
               sensitivity.max=0.2,
               sensitivity.change=0.04)

Citation

Cite as: McKnight, D.T. 2025. SNM: Stream Network Movements. R package version 0.1.2

Metadata

Version

0.1.5

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows