MixSIAR
MixSIAR copied to clipboard
Error message for plotting isospace
I cannot plot isospace due to an error message which has something to do with the aesthetics of ggplot. Please help!
tef_05May2023.csv [source_PW_SpDi_05May2023.csv]
(https://github.com/brianstock/MixSIAR/files/11409955/source_PW_SpDi_05May2023.csv)
The error messages is:
plot_data(filename="isopace_PW_Sp_05May2023", plot_save_pdf=TRUE,
-
plot_save_png=TRUE, mix,source,discr)
Error in ggplot2::geom_pointrange()
:
! Problem while setting up geom aesthetics.
ℹ Error occurred in the 2nd layer.
Caused by error in check_aesthetics()
:
! Aesthetics must be either length 1 or the same as the data (15)
✖ Fix the following mappings: linetype
Run rlang::last_trace()
to see where the error occurred.
rlang::last_trace() <error/rlang_error> Error in
ggplot2::geom_pointrange()
: ! Problem while setting up geom aesthetics. ℹ Error occurred in the 2nd layer. Caused by error incheck_aesthetics()
: ! Aesthetics must be either length 1 or the same as the data (15) ✖ Fix the following mappings:linetype
Backtrace: ▆
- └─MixSIAR::plot_data(...)
- └─MixSIAR::plot_data_two_iso(...)
-
├─base::print(g)
-
└─ggplot2:::print.ggplot(g)
-
├─ggplot2::ggplot_build(x)
-
└─ggplot2:::ggplot_build.ggplot(x)
-
└─ggplot2:::by_layer(...)
-
├─rlang::try_fetch(...)
-
│ ├─base::tryCatch(...)
-
│ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
-
│ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
-
│ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
-
│ └─base::withCallingHandlers(...)
-
└─ggplot2 (local) f(l = layers[[i]], d = data[[i]])
-
└─l$compute_geom_2(d)
-
└─ggplot2 (local) compute_geom_2(..., self = self)
-
└─self$geom$use_defaults(data, self$aes_params, modifiers)
-
└─ggplot2 (local) use_defaults(..., self = self)
-
└─ggplot2:::check_aesthetics(params[aes_params], nrow(data))