Skip to content

Commit

Permalink
v1.0.1.0000
Browse files Browse the repository at this point in the history
Bug fixes from demo.  Issue #14 , Issue #12 , Issue #11
  • Loading branch information
leppott committed Sep 26, 2017
1 parent f4109c5 commit 5904ca6
Show file tree
Hide file tree
Showing 18 changed files with 100 additions and 10 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
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
15 changes: 14 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ NEWS-MBSStools
================

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->
#> Last Update: 2017-09-24 16:57:29
#> Last Update: 2017-09-26 19:02:05

Version history.

Expand All @@ -11,6 +11,19 @@ Planned Updates

- None at this time.

v1.0.1.0000
===========

2017-09-26

- Update each function's description and vignette with the packages needed for that function to work properly.

- Update Vignette for a few typos and so shows in final package. Also messages=FALSE for XLConnect example.

- DESCRIPTION. Move rgdal from Depends to Suggests.

- Fish metric example not working in metric.values(). Issue \#14. Extra parameter. Removed and works.

v1.0.0.0000
===========

Expand Down
11 changes: 11 additions & 0 deletions NEWS.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ Version history.

* None at this time.

# v1.0.1.0000
2017-09-26

* Update each function's description and vignette with the packages needed for that function to work properly.

* Update Vignette for a few typos and so shows in final package. Also messages=FALSE for XLConnect example.

* DESCRIPTION. Move rgdal from Depends to Suggests.

* Fish metric example not working in metric.values(). Issue #14. Extra parameter. Removed and works.

# v1.0.0.0000
2017-09-24

Expand Down
2 changes: 2 additions & 0 deletions R/FlowSum.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions R/IonContrib.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#' In this case "Other" is added as an ion to capture any percentage of total conductivity not represented by the provided ions.
#' Plotting is done outside of this function.
#'
#' No special libraries are needed for this function.
#'
#' @param ion.data Input data. Column names match rows in the ref table
#' @param ion.ref Reference data for ions; Name (matches columns in data), Multiplier, and SortOrder. Default is included ref table.
#' @param col.Cond Column name with conductivity in "data". Default is blank.
Expand Down
4 changes: 3 additions & 1 deletion R/MapTaxaObs.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
#' Map taxonomic observations in Maryland. Inputs are 3 GIS shapefiles
#' (State, County, and Hydrology) for Maryland, Observations (taxa names and Lat/Longs), and
#' a crosswalk table of taxa names and map names. Input files are assumed to be Excel with the data on the first worksheet.
#' Requires the packages readxl and rgdal.
#'
#' The example data is fish but can be used for benthic macroinvertebrates as well.
#' Maps are output as PNG. There is a flag for "only" matches between the data and the crosswalk table (this is the default).
#' There is also a "verbose" flag for printing status messages to the user (this is the default).
#' Tests for existence of Data, GIS directories and required files. On failure,
#' stops and prints missing directories/files to screen.
#'
#' The R libraries rgdal and readxl are required for this function.
#'
#' @param obs Excel file containing 3 columns: TaxaName, Latitude83, Longitude83
#' @param xWalk Crosswalk (Excel file) of taxa names between taxa name in occurence file and file name outputs for maps.
#' Three columns (CommonName, Species, MapName).
Expand Down
2 changes: 2 additions & 0 deletions R/PHIcalc.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions R/metric.scores.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#'
#' This function calculates metric scores based on a Thresholds data frame.
#' Can generate scores for 1/3/5 (ScoreRegime="135") or 0-100 (ScoreRegime="100").
#'
#' The R library dplyr is needed for this function.
#
#' @param DF_Metrics Data frame of metric values (as columns), Index Name, and Index Region (strata).
#' @param MetricNames Names of columns of metric values.
Expand Down
4 changes: 3 additions & 1 deletion R/metric.values.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
#' * TROPHIC_MBSS = MBSS tropic status designations (ALL CAPS); OM, GE, IS, IV, etc.
#'
#' * PTOLR = Pollution tolerance level (ALL CAPS); T, I, NO TYPE.
#'
#' The R library dplyr is required for this function.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#' @param fun.DF Data frame of taxa (list required fields)
#' @param fun.Community Community name for which to calculate metric values (bugs, fish, or algae)
Expand All @@ -76,7 +78,7 @@
#' (myMetrics.Fish <- as.character(droplevels(unique(thresh[thresh[,"Index.Name"]==myIndex,"Metric"]))))
#' # Taxa Data
#' myDF.Fish <- taxa_fish
#' myMetric.Values.Fish <- metric.values(myDF.Fish, "SampleID", "fish", myMetrics.Fish)
#' myMetric.Values.Fish <- metric.values(myDF.Fish, "fish", myMetrics.Fish)
#' View(myMetric.Values.Fish)
#'
#' # Metrics, Index, Benthic Macroinvertebrates, genus
Expand Down
1 change: 1 addition & 0 deletions inst/extdata/Notebook_MBSStools.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ All data should have already been created.
Need to use testthat but not to that stage yet.
```{r, eval=FALSE}
# Check for errors (or press Cmd + Shift + E in RStudio)
#http://r-pkgs.had.co.nz/check.html
devtools::check()
```

Expand Down
5 changes: 3 additions & 2 deletions inst/extdata/Notebook_MBSStools.nb.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,9 @@ <h2>Error Checking</h2>
<p>Need to use testthat but not to that stage yet.</p>
<!-- rnb-text-end -->
<!-- rnb-chunk-begin -->
<!-- rnb-source-begin eyJkYXRhIjpbIiMgQ2hlY2sgZm9yIGVycm9ycyAob3IgcHJlc3MgQ21kICsgU2hpZnQgKyBFIGluIFJTdHVkaW8pIiwiZGV2dG9vbHM6OmNoZWNrKCkiXX0= -->
<!-- rnb-source-begin eyJkYXRhIjpbIiMgQ2hlY2sgZm9yIGVycm9ycyAob3IgcHJlc3MgQ21kICsgU2hpZnQgKyBFIGluIFJTdHVkaW8pIiwiI2h0dHA6Ly9yLXBrZ3MuaGFkLmNvLm56L2NoZWNrLmh0bWwiLCJkZXZ0b29sczo6Y2hlY2soKSJdfQ== -->
<pre class="r"><code># Check for errors (or press Cmd + Shift + E in RStudio)
#http://r-pkgs.had.co.nz/check.html
devtools::check()</code></pre>
<!-- rnb-source-end -->
<!-- rnb-chunk-end -->
Expand All @@ -255,7 +256,7 @@ <h2>Error Checking</h2>
</div>
</div>

<div id="rmd-source-code">LS0tDQp0aXRsZTogIk5vdGVib29rLCBNQlNTdG9vbHMiDQpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sNCi0tLQ0KDQpUaGlzIGlzIGFuIFtSIE1hcmtkb3duXShodHRwOi8vcm1hcmtkb3duLnJzdHVkaW8uY29tKSBOb3RlYm9vay4gV2hlbiB5b3UgZXhlY3V0ZSBjb2RlIHdpdGhpbiB0aGUgbm90ZWJvb2ssIHRoZSByZXN1bHRzIGFwcGVhciBiZW5lYXRoIHRoZSBjb2RlLiANCg0K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0KIyMgUmVsb2FkIGxpYnJhcnkNCmxpYnJhcnkobXlMaWJyYXJ5LGNoYXJhY3Rlci5vbmx5ID0gVFJVRSkNCiMgY2hhbmdlIHdkIGJhY2sgdG8gcGFja2FnZQ0Kc2V0d2QocGFzdGUwKCIuLyIsbXlMaWJyYXJ5KSkNCiN+fn5+fn5+fn5+fn5+fn5+fn5+fn5+fn5+fn5+fn5+fn5+DQpgYGANCg0KQWZ0ZXIgY3JlYXRpbmcgdGhlIHBhY2thZ2UgcmVsb2FkIGl0IGFmdGVyIHJlc3RhcnRpbmcgUiB3aXRoaW4gUlN0dWRpbyAoQ29udHJvbCtTaGlmdCtGMTApLg0KDQpgYGB7ciwgZXZhbD1GQUxTRX0NCiMgUmVzdGFydCBSIHdpdGhpbiBSU3R1ZGlvOiAgQ3RybCArIFNoaWZ0ICsgRjEwDQpsaWJyYXJ5KE1CU1N0b29scykNCj9tZXRyaWMuc2NvcmVzICANCmBgYA0KDQojIyBJbmNsdWRpbmcgRGF0YQ0KQWxsIGRhdGEgc2hvdWxkIGhhdmUgYWxyZWFkeSBiZWVuIGNyZWF0ZWQuDQoNCiMjIEVycm9yIENoZWNraW5nDQpOZWVkIHRvIHVzZSB0ZXN0dGhhdCBidXQgbm90IHRvIHRoYXQgc3RhZ2UgeWV0Lg0KYGBge3IsIGV2YWw9RkFMU0V9DQojIENoZWNrIGZvciBlcnJvcnMgKG9yIHByZXNzIENtZCArIFNoaWZ0ICsgRSBpbiBSU3R1ZGlvKQ0KI2h0dHA6Ly9yLXBrZ3MuaGFkLmNvLm56L2NoZWNrLmh0bWwNCmRldnRvb2xzOjpjaGVjaygpDQpgYGANCg0KDQo=</div>



Expand Down
3 changes: 3 additions & 0 deletions man/FlowSum.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/IonContrib.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/MapTaxaObs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/PHIcalc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/metric.scores.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/metric.values.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions vignettes/MBSStools_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand All @@ -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)
```
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 5904ca6

Please sign in to comment.