I'm working with a dataset and I want to set different limits for "y" axis, depending on the "Level" which the graph will be faceted by.
I tried to create a dataframe containing column-list that contains, in each row, a vector of length 2 that represents my maximum and inferior limit and a column with "Level" data (the column which is being used to facet_wrap()
, then I tried to set the limits in this part of my code:
lims(data = lim_df_agg_sub, aes(y = Limites_y, x = c(NA, NA)))
Where:
- lim_df_agg_sub is the dataframe containing the limits and levels;
- Limites_y is the column list containing a vector of length 2 with maximum and minimum limit.
The error I got from Rstudio is Error: All arguments must be named
, adn when I run rlang::last_error()
, it shows me this message:
All arguments must be named
Backtrace:
1. ggplot2::lims(...)
Is there any way to do what I want?