Skip to content

Commit

Permalink
Add deprecate messages, closes #121
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonEdwards committed Jul 9, 2019
1 parent d7b3ce8 commit 31154a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion R/stratify.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,15 @@
stratify <- function(by = NULL,
sample_data = FALSE,
bbs_data = NULL,
quiet = FALSE)
quiet = FALSE,
stratify_by = NULL)
{
if (isFALSE(is.null(stratify_by)))
{
message("Argument \"stratify_by\" has been deprecated in favour of \"by\"")
by <- stratify_by
}

if(isFALSE(is.element(by, c("state", "bcr", "latlong", "bbs_cws", "bbs_usgs"))))
{
stop("Invalid stratification specified"); return(NULL)
Expand Down
2 changes: 1 addition & 1 deletion man/stratify.Rd

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

0 comments on commit 31154a1

Please sign in to comment.