plot_index | R Documentation |
Compare estimated indices and their confidence intervals on a single plot.
Results from Table_for_SS3.csv
files are searched for and loaded as
objects, which are then plotted by model run and area
using unique colors for each run-area combination.
plot_index(
dir,
recursive = TRUE,
area = NULL,
filter = NULL,
keepyears = NULL,
limit = NULL,
legend_position = c(0.5, 0.05),
savefile = NULL
)
dir |
A file path with folders containing VASTWestCoast runs. Presumably each model run will be in its own folder, where these folder names are later used to name the lines on the figure. |
recursive |
A boolean value indicating whether or not you want to
recursively search for VASTWestCoast runs inside |
area |
A vector of character values specifying the areas to plot.
The area is specified as the Fleet column in the csv file. The default is
to keep all of the defined areas and partition the results by the folder
it was found in and area using colors.
|
filter |
A character value used for regex matching of the file names.
The default is |
keepyears |
A vector of years you want to plot.
If |
limit |
A upper limit of the vertical axis, which is forced. The default is to let the data define the upper limit, where all confidence intervals will be included. |
legend_position |
A vector of two numbers between zero and one that specify the location of the legend relative to the lower-left corner. The default values keeps the legend near the lower-left corner. |
savefile |
The file name that you want the results saved to. A full path can be specified, else the file will be saved in the current directory. |
A ggplot object that has been augmented to include the data used for
the plot. This data set is available using [["dataforplot"]]
and was
created from sourced Table_for_SS3.csv
files that were
subset appropriately based on the input arguments. The ggplot object is also
saved to the disk if !is.null(savefile) == TRUE
.
Kelli F. Johnson
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.