knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

R build status Codecov test coverage Lifecycle: stable DOI DOI

Statement of need

The nsink package is an R implementation of the methods described in Kellogg et. al (2010). Previous implementation of this approach relied on a manual, vector based approach that was time consuming to prepare. This approach uses a hybrid raster-vector approach that takes relatively little time to set up for each new watershed and relies on readily available data. Total run times vary, but range from minutes up to 5 hours depending on options selected. Previous versions took weeks of manual data manipulation. Thus, nsink was developed to satisfy the need for quicker implementation of the NSink method as described in Kellogg et. al (2010).

nsink functionality

As of r lubridate::today() user functions for the nsink package are:

Installation instructions

At this time we plan on maintaining the nsink package as a GitHub only package and thus it won't be available directly from CRAN. You may use the install_github() function from the remotes package to install it. The code below will take care of installing remotes and installing nsink from the GitHub repository.

install.packages("remotes")
remotes::install_github("usepa/nsink", dependencies = TRUE, build_vignettes = TRUE)

And then to load up the package:

library(nsink)

Documentation and examples

All functions are documented, with examples, and that documentation may be accessed, in R, via the usual help functions. Additionally, an introduction to the nsink package with a more detailed workflow is documented in a vignette.

# Load up package
library(nsink)

# Access package level help
help(package = "nsink")

# Access the Introduction to nsink vignette
vignette("intro", package = "nsink")

Contributing

If you would like to contribute to the nsink package, please first read the CONTRIBUTING. In short, contributions are happily accepted either via suggestions in the Issues or via pull request.



jhollist/nsink documentation built on June 14, 2025, 8:58 p.m.