Skip to content

Commit

Permalink
v1.2.0.9001
Browse files Browse the repository at this point in the history
* fix: Update examples and vignette to not use droplevels()
    + Revised thresholds no longer has levels
  • Loading branch information
leppott committed Apr 8, 2024
1 parent 4b7023f commit be09e1f
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 44 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Description: Suite of tools for data manipulation and calculations for Maryland
DNR MBSS program. Includes functions for calculating FIBI, BIBI (MBSS
genus), BIBI (MSW family), PHI, flow sums, ion contributions, and taxa
distribution maps.
Version: 1.2.0
Version: 1.2.0.9001
Authors@R: c(
person("Erik W.", "Leppo", email="Erik.Leppo@tetratech.com", role=c("aut","cre")),
person("Ann","Roseberry Lincoln", role="ctb"),
Expand Down
7 changes: 6 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ NEWS-MBSStools

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> Last Update: 2024-04-05 16:00:44.873446
#> Last Update: 2024-04-08 12:38:08.080495

# MBSStools v1.2.0.9001 (2024-04-08)

- fix: Update examples and vignette to not use droplevels()
- Revised thresholds no longer has levels

# MBSStools v1.2.0 (2024-04-05)

Expand Down
7 changes: 6 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ NEWS-MBSStools

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> Last Update: 2024-04-05 16:00:44.873446
#> Last Update: 2024-04-08 12:38:08.080495

# MBSStools v1.2.0.9001 (2024-04-08)

- fix: Update examples and vignette to not use droplevels()
- Revised thresholds no longer has levels

# MBSStools v1.2.0 (2024-04-05)

Expand Down
5 changes: 5 additions & 0 deletions NEWS.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ knitr::opts_chunk$set(
cat(paste0("Last Update: ",Sys.time()))
```

MBSStools v1.2.0.9001 (2024-04-08)
================
* fix: Update examples and vignette to not use droplevels()
+ Revised thresholds no longer has levels

MBSStools v1.2.0 (2024-04-05)
================
* refactor: Bump version number for fix in previous commit
Expand Down
12 changes: 6 additions & 6 deletions R/metric.scores.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#' # Thresholds
#' thresh <- metrics_scoring
#' # get metric names for myIndex
#' (myMetrics.Fish <- as.character(droplevels(unique(thresh[thresh[,
#' "Index.Name"]==myIndex,"MetricName.Other"]))))
#' (myMetrics.Fish <- as.character(unique(thresh[thresh[,
#' "Index.Name"] == myIndex,"MetricName.Other"])))
#' # Taxa Data
#' myDF.Fish <- taxa_fish
#' myMetric.Values.Fish <- metric.values(myDF.Fish, "fish", myMetrics.Fish,
Expand Down Expand Up @@ -61,8 +61,8 @@
#' # Thresholds
#' thresh <- metrics_scoring
#' # get metric names for myIndex
#' (myMetrics.Bugs.MBSS <- as.character(droplevels(unique(thresh[thresh[,
#' "Index.Name"]==myIndex,"MetricName.Other"]))))
#' (myMetrics.Bugs.MBSS <- as.character(unique(thresh[thresh[,
#' "Index.Name"] == myIndex,"MetricName.Other"])))
#' # Taxa Data
#' myDF.Bugs.MBSS <- taxa_bugs_genus
#' myMetric.Values.Bugs.MBSS <- metric.values(myDF.Bugs.MBSS, "bugs",
Expand Down Expand Up @@ -102,8 +102,8 @@
#' # Thresholds
#' thresh <- metrics_scoring
#' # get metric names for myIndex
#' (myMetrics.Bugs.MSW <- as.character(droplevels(unique(thresh[thresh[,
#' "Index.Name"]==myIndex,"MetricName.Other"]))))
#' (myMetrics.Bugs.MSW <- as.character(unique(thresh[thresh[,
#' "Index.Name"] == myIndex,"MetricName.Other"])))
#' # Taxa Data
#' myDF.Bugs.MSW <- taxa_bugs_family
#' myMetric.Values.Bugs.MSW <- metric.values(myDF.Bugs.MSW, "bugs",
Expand Down
15 changes: 7 additions & 8 deletions R/metric.values.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@
#' # Thresholds
#' thresh <- metrics_scoring
#' # get metric names for myIndex
#' (myMetrics.Fish <- as.character(droplevels(unique(thresh[thresh[,
#' "Index.Name"]==myIndex,"MetricName.Other"]))))
#' (myMetrics.Fish <- as.character(unique(thresh[thresh[,
#' "Index.Name"] == myIndex,"MetricName.Other"])))
#' # Taxa Data
#' myDF.Fish <- taxa_fish
#' myMetric.Values.Fish <- metric.values(myDF.Fish, "fish", myMetrics.Fish)
Expand All @@ -110,8 +110,8 @@
#' # Thresholds
#' thresh <- metrics_scoring
#' # get metric names for myIndex
#' (myMetrics.Bugs.MBSS <- as.character(droplevels(unique(thresh[thresh[,
#' "Index.Name"]==myIndex,"MetricName.Other"]))))
#' (myMetrics.Bugs.MBSS <- as.character(unique(thresh[thresh[,
#' "Index.Name"] == myIndex,"MetricName.Other"])))
#' # Taxa Data
#' myDF.Bugs.MBSS <- taxa_bugs_genus
#' myMetric.Values.Bugs.MBSS <- metric.values(myDF.Bugs.MBSS, "bugs",
Expand All @@ -123,8 +123,8 @@
#' # Thresholds
#' thresh <- metrics_scoring
#' # get metric names for myIndex
#' (myMetrics.Bugs.MSW <- as.character(droplevels(unique(thresh[thresh[,
#' "Index.Name"]==myIndex,"MetricName.Other"]))))
#' (myMetrics.Bugs.MSW <- as.character(unique(thresh[thresh[,
#' "Index.Name"] == myIndex,"MetricName.Other"])))
#' # Taxa Data
#' myDF.Bugs.MSW <- taxa_bugs_family
#' myMetric.Values.Bugs.MSW <- metric.values(myDF.Bugs.MSW, "bugs",
Expand All @@ -136,8 +136,7 @@
# myIndex <- "MBSS.2005.Fish"
# thresh <- metrics_scoring
# (myMetrics.Fish <- as.character(
# droplevels(unique(thresh[thresh[,"Index.Name"]==
# myIndex,"MetricName.Other"]))))
# unique(thresh[thresh[,"Index.Name"] == myIndex,"MetricName.Other"])))
# myDF <- taxa_fish # myDF.Fish
# # myMetric.Values.Fish <- metric.values(myDF, "SampleID", "fish",
# # myMetrics.Fish, TRUE)
Expand Down
18 changes: 9 additions & 9 deletions doc/MBSStools_vignette.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ myIndex <- "MBSS.2005.Fish"
# Thresholds
thresh <- metrics_scoring
# get metric names for myIndex
(myMetrics.Fish <- as.character(droplevels(unique(thresh[thresh[,"Index.Name"]==myIndex,"MetricName.Other"]))))
(myMetrics.Fish <- as.character(unique(thresh[thresh[,"Index.Name"] == myIndex,"MetricName.Other"])))
# Taxa Data
myDF.Fish <- taxa_fish
myMetric.Values.Fish <- metric.values(myDF.Fish, "fish", myMetrics.Fish, TRUE)
Expand All @@ -31,7 +31,7 @@ myIndex <- "MBSS.2005.Bugs"
# Thresholds
thresh <- metrics_scoring
# get metric names for myIndex
(myMetrics.Bugs.MBSS <- as.character(droplevels(unique(thresh[thresh[,"Index.Name"]==myIndex,"MetricName.Other"]))))
(myMetrics.Bugs.MBSS <- as.character(unique(thresh[thresh[,"Index.Name"] == myIndex,"MetricName.Other"])))
# Taxa Data
myDF.Bugs.MBSS <- taxa_bugs_genus
myMetric.Values.Bugs.MBSS <- metric.values(myDF.Bugs.MBSS, "bugs", myMetrics.Bugs.MBSS)
Expand All @@ -54,7 +54,7 @@ myIndex <- "MSW.1999.Bugs"
# Thresholds
thresh <- metrics_scoring
# get metric names for myIndex
(myMetrics.Bugs.MSW <- as.character(droplevels(unique(thresh[thresh[,"Index.Name"]==myIndex,"MetricName.Other"]))))
(myMetrics.Bugs.MSW <- as.character(unique(thresh[thresh[,"Index.Name"] == myIndex,"MetricName.Other"])))
# Taxa Data
myDF.Bugs.MSW <- taxa_bugs_family
myMetric.Values.Bugs.MSW <- metric.values(myDF.Bugs.MSW, "bugs", myMetrics.Bugs.MSW)
Expand Down Expand Up @@ -126,12 +126,12 @@ head(df.lu.taxa)
## ----TaxaMaps Example Code, eval=FALSE----------------------------------------
# # Set Working Directory
# wd <- getwd()
#
#
# # Inputs
# Obs <- "AllFish_95to16.xls"
# XWalk <- "TaxaMapsCrossWalk20170731.xlsx"
# wd <- getwd()
#
#
# # Create maps
# MapTaxaObs(Obs, XWalk, wd, onlymatches = FALSE)

Expand Down Expand Up @@ -170,7 +170,7 @@ xWalk <- "TaxaMapsCrossWalk20170731.xlsx"

oldwd <- getwd()
setwd("..") #resets to vignette dir when run as code chunk
dirMain <- getwd()
dirMain <- getwd()
dirData = "Data"
dirGIS = "GIS"
verbose = TRUE
Expand Down Expand Up @@ -228,7 +228,7 @@ taxon <- as.character(map.taxa$CommonName[i])
df.taxon.sites <- subset(df.taxa.obs, df.taxa.obs[,"CommonName"]==taxon)
df.taxon.sites <- subset(df.taxon.sites, !is.na(df.taxon.sites["Latitude83"]))


plot(state, col="white", border="gray")
plot(coastline, add = TRUE, col="light blue", border=FALSE)
plot(counties, add = TRUE, col="white", border="darkslategray", lwd=0.5)
Expand All @@ -237,8 +237,8 @@ taxon <- as.character(map.taxa$CommonName[i])
"+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77
+x_0=400000 +y_0=0 +datum=NAD83 +units=m +no_defs")
points(proj.sites[,1], proj.sites[,2], pch=21, col="black", bg="green", cex=1.0)


#reset old working directory
#setwd <- oldwd

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ account: tetratech-wtr-wne
server: shinyapps.io
hostUrl: https://api.shinyapps.io/v1
appId: 2566633
bundleId: 4773852
bundleId:
url: https://tetratech-wtr-wne.shinyapps.io/MBSStools/
when: 1625071889.94754
lastSyncTime: 1625071889.94754
asMultiple: FALSE
asStatic: FALSE
4 changes: 2 additions & 2 deletions inst/shiny-examples/MBSStools/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ shinyServer(function(input, output) {

#myIndex <- input$MMI
thresh <- MBSStools::metrics_scoring
myMetrics <- as.character(droplevels(unique(thresh[thresh[
,"Index.Name"]==myIndex,"MetricName.Other"])))
myMetrics <- as.character(unique(thresh[thresh[
,"Index.Name"] == myIndex,"MetricName.Other"]))
#
# myCommunity <- Community[match(myIndex, MMIs)]
myCol_Strata <- col_Strata[match(myIndex, MMIs)]
Expand Down
2 changes: 1 addition & 1 deletion inst/shiny-examples/MBSStools/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ library(shinyjs) # used for togglestate of download button
shinyUI(fluidPage(

# Application title
titlePanel("MBSStools, IBI Calculator, v1.2.0"),
titlePanel("MBSStools, IBI Calculator, v1.2.0.9001"),

# SideBar
sidebarLayout(
Expand Down
12 changes: 6 additions & 6 deletions man/metric.scores.Rd

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

12 changes: 6 additions & 6 deletions man/metric.values.Rd

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

0 comments on commit be09e1f

Please sign in to comment.