-
Notifications
You must be signed in to change notification settings - Fork 5
plot_indices() cannot accommodate a numeric group argument #212
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Within FIMS, we have module == "Fleet" and right now we are not automatically able to pass fleet names from R to the C++ so we are relying on module_id to differentiate between the fleets. So, I passed module_id to stockplotr::plot_indices() as the group and I got the following error because module_id is a numeric value. It would be great if {stockplotr} could accommodate numeric groups where it just turns them into a character for you.
stockplotr::plot_indices(
dat = dplyr::mutate(output_fims,
label = dplyr::if_else(label == "index_expected", "indices", label)
) |>
dplyr::filter(!is.na(observed)),
group = "module_id"
)
Error in `ggplot2::geom_point()`:
! Problem while computing aesthetics.
i Error occurred in the 1st layer.
Caused by error in `scale_f()`:
! A continuous variable cannot be mapped to the shape aesthetic.
i Choose a different aesthetic or use `scale_shape_binned()`.
Run `rlang::last_trace()` to see where the error occurred.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
In progress