Skip to contents

R package for working with Massachusetts surface water quality data, created in partnership by the Mass Bays National Estuary Partnership.

Please cite the package as:

Beck, M.W., Wetherill, B., Carr, J. 2023. MassWateR: Improving Quality Control, Analysis, and Sharing of Water Quality Data. PLOS ONE. 18(11):e0293737. doi: 10.1371/journal.pone.0293737

Installation

The package can be installed as follows:

# Install the package
install.packages("MassWateR")

Windows PC users may encounter the following warning when installing MassWateR.

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding: https://cran.r-project.org/bin/windows/Rtools/

This warning can be ignored for the MassWateR solution. If desired, RTools can be obtained following the instructions here.

Using the package

Please see the vignette articles for an overview of how to use functions in the MassWateR package. The vignettes are organized topically as follows:

  • MassWateR quick start: A quick start guide to importing data and using the various functions in MassWateR. Detailed information is provided in the other vignettes.
  • MassWateR data input and checks: Information on datasets required to use the package, the required formats and how to import them into R, and the checks that are run when the data are imported.
  • MassWateR outlier checks: Information on evaluating outliers in the results data for surface water quality.
  • MassWateR quality control functions: Information on using the quality control functions to assess completeness and accuracy of results data for surface water quality and to generate automated reports.
  • MassWateR analysis functions: Information on using the analysis functions to evaluate trends, summaries, and maps in the results data for surface water quality.
  • MassWateR utility functions: Information on using optional utility functions for custom analyses.
  • Modifying plots: A short tutorial on modifying plots created with MassWateR.
  • Water Quality Exchange output: Information on generating output that will facilitate upload of data to the EPA Water Quality Exchange
  • Out of state?: MassWateR can be used anywhere and this article describes some tips for using the package outside of Massachusetts.

In addition to the content on this web page, the MassWateR Community of Practice forum is a space for users to find help, share ideas, and suggest improvements for the package. Please follow the link to register and login to the forum.

Issues and help

Please report any issues (bugs or errors) on the issues link for the repository. Please visit the Community of Practice forum for general questions, help, sharing ideas, or to suggest package improvements.

Contributing

Please view our contributing guidelines for any changes or pull requests.

Code of Conduct

Please note that the MassWateR project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.