-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
Package: MBSStools | ||
Title: MBSS tool suite for calculations and data manipulation. | ||
Version: 1.0.0.0000 | ||
Version: 1.0.1.0000 | ||
Authors@R: c( | ||
person("Erik W.", "Leppo", email="[email protected]", role=c("aut","cre")), | ||
person("Ann","Roseberry Lincoln", role="ctb"), | ||
person("Matt","Ashton", role="dtc")) | ||
Description: Suite of tools for data manipulation and calculations for Maryland DNR MBSS program. | ||
Depends: R (>= 3.3.2), rgdal | ||
Depends: R (>= 3.3.2) | ||
License: GPL-2 | ||
Encoding: UTF-8 | ||
URL: https://github.com/leppott/MBSStools | ||
RoxygenNote: 6.0.1 | ||
Suggests: knitr, | ||
rmarkdown, | ||
readxl, | ||
dplyr | ||
dplyr, | ||
rgdal | ||
VignetteBuilder: knitr | ||
LazyData: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
#' Generates error message for blank (null) entries for inputs for Lateral Location, Depth, and Velocity. | ||
#' In addition it checks for samples with more than one channel but have the same Channel Number. | ||
#' | ||
#' No special libraries are needed for this function. | ||
#' | ||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
# [email protected] (EWL) | ||
# 20170419 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
#' | ||
#' Calculate MBSS Physical Habitat Index (PHI), Paul et al. 2003. | ||
#' | ||
#' No special libraries are needed for this function. | ||
#' | ||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
# [email protected] (EWL) | ||
# 20170327 | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,30 @@ install_github("leppott/MBSStools") | |
|
||
To contact the author directly email [email protected]. | ||
|
||
# Packages | ||
Serveral packages were used to build the functionality in `MBSStools`. | ||
|
||
1. FlowSum; no extra packages | ||
|
||
2. IonContrib; no extra packages | ||
|
||
3. MapTaxaObs; `readxl` and `rgdal` | ||
|
||
4. metric.scores; `dplyr` | ||
|
||
5. metric.values; `dplyr` | ||
|
||
6. PHIcalc; no extra packages | ||
|
||
These packages should install automatically when `MBSStools` installs. But if you encounter issues with a function not working ensure that the necessary package dependencies are installed. | ||
|
||
To install packages follow the example of the code below for installing `dplyr`. | ||
|
||
```{r insall example 2, eval=FALSE} | ||
insall.package("dplyr") | ||
``` | ||
|
||
|
||
# Contents | ||
There are several functions included in the library each with a particular focus on a dataset and the necessary calculations for data analysis. | ||
|
||
|
@@ -53,6 +77,8 @@ There are two functions; metric.values() to calculate the metrics (e.g., total i | |
|
||
In background is a file (/data-raw/metrics.scoring.tab) wiht a table of metric names, scoring thresholds, index name, and index regions. These can be changed to modify the index names, bioregions, metric names, and scoring thresholds. This table can be modified and used as input into the function. For simplicity this table is included by default. | ||
|
||
The functions metric.values() and metric.scores() require the `dplyr` function. | ||
|
||
### IBI, Fish | ||
Calculates the fish IBI. | ||
|
||
|
@@ -175,6 +201,8 @@ The maps for all taxa can be generated from a single line of code and then given | |
|
||
The maps for all taxa can be generated from a single line of code and then given to the web site maintainers as replacements. The maps generated with this function use a 'crosswalk' table that converts taxa names to map names. | ||
|
||
The function MapTaxaObs() requires the `readxl` and `rgdal` packages. | ||
|
||
## Data inputs | ||
The user will need GIS files for the state of Maryland for State, County, and Water. | ||
|
||
|
@@ -364,6 +392,8 @@ df.lu.taxa[,"CommonName"] <- tolower(df.lu.taxa[,"CommonName"]) | |
## Stream Discharge | ||
Calculate stream discharge based on field measurements. Side channels that are properly identified in the data will be included. | ||
|
||
The function FlowSum() requires the no additional packages. | ||
|
||
```{r Discharge, eval=FALSE} | ||
library(MBSStools) | ||
# data | ||
|
@@ -387,6 +417,8 @@ Data will need to be in "wide" format. That is, a single record for each sample | |
|
||
A reference table of ions and their equivalent ionic conductance at infinite dilution is provided with the function as "MBSS.Ion.Ref". The function allows for input of a user supplied data frame if this table needs updating with more ions. | ||
|
||
The function IonContrib() requires the no additional packages. | ||
|
||
```{r Ion Ref, echo=FALSE, results='asis'} | ||
knitr::kable(MBSS.Ion.Ref) | ||
``` | ||
|
@@ -457,6 +489,8 @@ There are two versions of the calculation based on pre- and post-2000. The func | |
|
||
The input is a data frame with column names matching the variables collected in the field along with SampleID, bioregion, and area (acres). | ||
|
||
The function PHIcalc() requires the no additional packages. | ||
|
||
```{r PHI Input, echo=FALSE, results='asis'} | ||
x <- MBSS.PHI | ||
knitr::kable(head(x)) | ||
|