Skip to content

Commit

Permalink
sanity check #212
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbeaudette committed Sep 1, 2021
1 parent b9ded9c commit 953b1d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/estimateAWC.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ estimateAWC <- function(texcl, omcl, precision = 2,
hiOM_l = c(0.04, 0.04, 0.07, 0.07, 0.07, 0.07, 0.08, 0.1, 0.11, 0.11, 0.13, 0.16, 0.18, 0.2, 0.22, 0.21, 0.18, 0.17, 0.12, 0.13, 0.13, 0.15, 0.35, 0.45, 0.55),
hiOM_h = c(0.06, 0.06, 0.09, 0.09, 0.09, 0.08, 0.1, 0.13, 0.13, 0.14, 0.15, 0.18, 0.2, 0.22, 0.24, 0.23, 0.2, 0.19, 0.14, 0.15, 0.15, 0.18, 0.45, 0.55, 0.65), stringsAsFactors = FALSE)


# sanity checks
if(! all(omcl %in% c(1, 2, 3))) {
stop('`omcl` must be 1, 2, or 3', call. = FALSE)
}

if (length(texcl) != length(omcl))
stop("Error: Mismatch in length of input vectors `texcl` and `omcl`")

Expand Down

0 comments on commit 953b1d6

Please sign in to comment.