knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

Water Discharge Analysis R Package.

img License

This package was developed to help analyze stream discharge data.

This package was written for the B.C. Ministry of Environment by Carl James Schwarz (cschwarz.stat.sfu.ca@gmail.com).

Installing the package.

To install the latest version of BCWaterDischargeAnalysis:

library(devtools)   # has the install_github() function
# This will take about 5 minutes to install
install_github("bcgov/BCWaterDischargeAnalysis", build_vignettes = TRUE) 
# Using `build_vignettes = TRUE` will slow down the install, but is necessary if 
# you want to read the vignette, which is recommended
library(BCWaterDischargeAnalysis)

Vignettes

You can see the vignette names using

vignette(package="BCWaterDischargeAnalysis")

You can read the vignette using:

vignette("example-analysis", package="BCWaterDischargeAnalysis")

Sample Scripts

Sample scripts are available in the GitHub repository bcgov/BCWaterDischargeAnalysis-SampleScripts

Help on functions

Use the help function of R in the usual way.

help(package="BCWaterDischargeAnalysis") # list of all functions in package
help(compute.Q.stat.annual)  # help on individual function

Data

Create a data frame (e.g. df) with two varibles:

Variable | Description ---------|------------- Date | The data of the reading in standard R date class format. For example to convert a 4-digit year, numeric month, and numeric day of the month use df$Date <- as.Date{paste(df$Year,'-',df$Month,'-',df$Day,sep="")}. To convert a character string (e.g. '1/15/2001') use the as.Date(flow$chardate, "%d/%m/%Y") function. The formatting codes (%Y etc) are explained in the help for the strptime() function. Q | The average daily flow as a numeric value.

Other variables in the data frame will be ignored.

Missing values can be indicated by leaving out dates with missing discharge values, or by setting the value of Q to missing (NA).

The treatment of missing values in the analysis is explained in more detail in the vignette.

Project Status

This project is retired. While it is complete and fully functional, it is no longer being used or supported. See fasstr for the next generation.

Getting Help or Reporting an Issue

To report bugs/issues/feature requests, please file an issue.

License

Copyright 2017 Province of British Columbia

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


bcgov/BCWaterDischargeAnalysis documentation built on Dec. 21, 2020, 2:20 p.m.