Skip to content

Commit

Permalink
dependency clean up. Coding should be pretty much done. Vignette time.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblodgett-usgs committed Apr 20, 2017
1 parent d2ed167 commit fb9ab2c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
5 changes: 0 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@ Maintainer: Who to complain to <dblodgett@usgs.gov>
Depends:
R (>= 3.0)
Imports:
zoo,
chron,
doBy,
xml2,
hydroGOF,
EflowStats,
lmomco,
dataRetrieval,
jsonlite,
readr
Suggests:
xtable,
knitr,
rmarkdown,
testthat
Expand Down
6 changes: 3 additions & 3 deletions R/calculate_GoF_stats.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Function to calculate GoF statistics for given observed and modeled data sets
#' Function to calculate Goodness of Fit statistics
#'
#' This function accepts observed and modeled data frames of daily flow data and returns a data frame of
#' calculated GoF statistics
#' This function accepts observed and modeled data frames of daily flow
#' data and returns a data frame of calculated GoF statistics
#'
#' @param Modeled data frame of daily flow data
#' @param Gaged data frame of daily flow data
Expand Down
10 changes: 6 additions & 4 deletions R/calculate_GoF_summary_stats.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Function to calculate monthly annual GoF statistics for given observed and modeled data sets
#' Function to calculate monthly annual GoF statistics
#'
#' This function accepts observed and modeled data frames of daily flow data and returns a data frame of
#' calculated monthly annual GoF statistics
#' This function accepts observed and modeled data frames of daily flow data
#' and returns a data frame of calculated monthly annual GoF statistics
#'
#' @param Gaged data frame of daily flow data
#' @param Modeled data frame of daily flow data
Expand All @@ -13,6 +13,8 @@
#' Gaged<-sampleData
#' Modeled<-sampleData
#' calculate_GoF_summary_stats(Gaged,Modeled)
# This function should @importFrom hydrGOF rmse pbias but
# something is wrong with the rmse function.
calculate_GoF_summary_stats <- function(Gaged,Modeled) {
NSEv <- vector(length=14)
NSELOGv <- vector(length=length(NSEv))
Expand All @@ -28,7 +30,7 @@ calculate_GoF_summary_stats <- function(Gaged,Modeled) {
NSEv[i] <- nse(GagedTmp[,c],ModeledTmp[,c])
NSELOGv[i] <- nselog(GagedTmp[,c],ModeledTmp[,c])
RMSEv[i] <- rmse(GagedTmp[,c],ModeledTmp[,c])
PBIASv[i] <- hydroGOF::pbias(GagedTmp[,c],ModeledTmp[,c])
PBIASv[i] <- pbias(GagedTmp[,c],ModeledTmp[,c])
PEARSONv[i] <- cor(GagedTmp[,c],ModeledTmp[,c],method="pearson")
SPEARMANv[i] <- cor(GagedTmp[,c],ModeledTmp[,c],method="spearman")

Expand Down
6 changes: 3 additions & 3 deletions man/calculate_GoF_stats.Rd

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

6 changes: 3 additions & 3 deletions man/calculate_GoF_summary_stats.Rd

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

0 comments on commit fb9ab2c

Please sign in to comment.