|
5 | 5 | #' `biomass_observed` column in the species parameter data frame, this function |
6 | 6 | #' plots the biomass of each species in the model against the observed |
7 | 7 | #' biomasses. When called with a MizerSim object, the plot will use the model |
8 | | -#' biomasses predicted for the final time step in the simulation. For the |
9 | | -#' MizerSim and plotly methods, `ratio` defaults to `FALSE`. |
| 8 | +#' biomasses predicted for the final time step in the simulation. `ratio` |
| 9 | +#' defaults to `FALSE`. |
10 | 10 | #' |
11 | 11 | #' Before you can use this function you will need to have added a |
12 | 12 | #' `biomass_observed` column to your model which gives the observed biomass in |
|
30 | 30 | #' with the species indices, or a logical vector indicating for each species |
31 | 31 | #' whether it is to be included (TRUE) or not. |
32 | 32 | #' @param ratio Whether to plot model biomass vs. observed biomass (FALSE) or |
33 | | -#' the ratio of model : observed biomass (TRUE). Default is TRUE. |
| 33 | +#' the ratio of model : observed biomass (TRUE). Default is FALSE. |
34 | 34 | #' @param log_scale Whether to plot on the log10 scale (TRUE) or not (FALSE). |
35 | 35 | #' For the non-ratio plot this applies for both axes, for the ratio plot only |
36 | 36 | #' the x-axis is on the log10 scale. Default is TRUE. |
|
65 | 65 | #' plotBiomassObservedVsModel(params, show_unobserved = TRUE, ratio = FALSE) |
66 | 66 | #' |
67 | 67 | #' # Show the ratio instead |
68 | | -#' plotBiomassObservedVsModel(params) |
69 | | -plotBiomassObservedVsModel <- function(object, species = NULL, ratio = TRUE, |
| 68 | +#' plotBiomassObservedVsModel(params, ratio = TRUE) |
| 69 | +plotBiomassObservedVsModel <- function(object, species = NULL, ratio = FALSE, |
70 | 70 | log_scale = TRUE, return_data = FALSE, |
71 | 71 | labels = TRUE, show_unobserved = FALSE, ...) { |
72 | 72 | UseMethod("plotBiomassObservedVsModel") |
73 | 73 | } |
74 | 74 | #' @export |
75 | | -plotBiomassObservedVsModel.MizerParams <- function(object, species = NULL, ratio = TRUE, |
| 75 | +plotBiomassObservedVsModel.MizerParams <- function(object, species = NULL, ratio = FALSE, |
76 | 76 | log_scale = TRUE, return_data = FALSE, |
77 | 77 | labels = TRUE, show_unobserved = FALSE, ...) { |
78 | 78 | # preliminary checks |
|
0 commit comments