-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(plot_spawning_biomass): Remove complications
Just have a standard plot and not all the if else statements by using simple ifelse statements in the code. Also, removed plots for non-standard output per Sam's guidance. Changes to all plotting and tables * dat is an object rather than reading in the file every time a figure or table is created, this change is carried over throughout the documentation and the code in all functions. * Removed SS3 and BAM methods Changes to `plot_spawning_biomass()` * There was a problem with `if(any(grepl("target", output$label)))` because it ignored what the user specified in `ref_line` if target is present in label, i.e., you could never get to MSY. There should be a two-level check, i.e., what does the user want and is it present. I have not fixed this latter problem. * Fixed use of `..., ]$estimate` to `..., "estimate"]` because you should not use the dollar sign which allows for partial matches. * Use `switch()` statements instead of nested `if` `else` statements. Actually, now the function is so simple that I do not even have any switch statements but they can be helpful instead of nested if else statements. * Fixed the non-relative plots to truncate data to only use years less than end_yr * Some of the scaled items were hard-coded to 1000 instead of using scale_amount * Removed show_warnings because it was not actually doing anything * Use end_year rather than renaming it to endyr * Subset sb to end year before determining the correct number of breaks * MSY does not work so I removed it from the default reference list, only target and unfished work Need to fix: * units are not divided by scale amount to create new unit label * Why do we think that our determination of breaks is better than what ggplot2 provides? * There is no example
- Loading branch information
1 parent
b09ce6a
commit 6664ebd
Showing
11 changed files
with
335 additions
and
876 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ Imports: | |
dplyr, | ||
flextable, | ||
ggplot2, | ||
glue, | ||
naniar, | ||
nmfspalette, | ||
stringr, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.