Skip to content

Commit

Permalink
Use 'stock' instead of 'taxa'
Browse files Browse the repository at this point in the history
  • Loading branch information
arni-magnusson committed Aug 8, 2022
1 parent ede6a47 commit 2afad88
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: SOFIA
Version: 2.0.0
Date: 2022-08-04
Date: 2022-08-08
Title: Tools to Work with SOFIA Analyses
Authors@R: c(person("Rishi", "Sharma", role="aut"),
person("Arni", "Magnusson", role=c("aut","cre"), email="thisisarni@gmail.com"))
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SOFIA 2.0.0 (2022-08-04)
# SOFIA 2.0.0 (2022-08-08)

* Added functions gitRepos(), gitClone(), and gitCloneAll() to list and clone
GitHub repositories.
Expand All @@ -7,6 +7,10 @@

* Added errors and warnings if stock names in catch/effort/priors don't match.

* Simplified addDriors() so it requires only the 'stock' name, not the 'taxa'
name. These names used to be identical, but only 'stock' will be used from now
on.

* Improved plotCat() so it treats the first two columns of the input data frame
as stock and year.

Expand Down
5 changes: 2 additions & 3 deletions R/addDriors.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
#'
#' Add driors (data and priors) column to \sQuote{stocks} object.
#'
#' @param stocks \code{tibble} containing \code{stock}, \code{taxa}, and
#' \code{data}.
#' @param stocks \code{tibble} containing \code{stock} and \code{data}.
#' @param priors data frame containing \code{stock}, \code{initial_state},
#' \code{initial_state_cv}, \code{terminal_state}, and
#' \code{terminal_state_cv}.
Expand Down Expand Up @@ -73,7 +72,7 @@ addDriors <- function(stocks, priors, same.priors, shape_prior=2,
p <- if(same.priors) match("All", priors$stock)
else match(stocks$stock[i], priors$stock)
driors[[i]] <- format_driors(
taxa = stocks$taxa[i],
taxa = stocks$stock[i],
shape_prior = 2,
catch = stocks$data[[i]]$capture,
years = stocks$data[[i]]$year,
Expand Down
3 changes: 1 addition & 2 deletions man/addDriors.Rd

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

0 comments on commit 2afad88

Please sign in to comment.