Dominance levels from input data (sim and obs) instead of using hard-coded values for intercrop case
Dominance column is missing or contains NA, a default value (Single Crop) is applied to ensure consistent legends.save_plot_png() behavior when saving a single ggplot object (instead of a list of plots), ensuring proper device handling and clean function return.sim objects inherit from class cropr_simulation.ggplot2 warnings related to unknown shapes during plot generation.Fixed several issues in scatter plots:
Fixed computation of residuals when using reference variables.
Removed non-ASCII characters from the startup message to ensure CRAN portability.
Cleaned up unused package dependencies in DESCRIPTION.
Dropped unnecessary dependencies (crayon, rstudioapi, stringr).
Increased the minimal R version requirement to 4.2.0 (previously 4.1.0) to ensure compatibility with Hmisc (ggplot2).
Continuous integration (CI) improvements:
General code styling and minor cleanup across functions and tests.
Fixed warnings generated by last version of ggplot2 due to existing fields provided in aes but that are not actually used (#10).
Fixed a bug in plot that occurred when trying to plot several versions of simulated results and without intercrop situations.
Fixed cff file generation using github action. Now generated on each commit that modifies the Description file + on release.
Minor changes to clean the code following CRAN checks procedure application.
For users:
[ for cropr_simulation, i.e. we can now index the output of plots using [bind_rows_sim for bind_rowsall_situations = FALSE to get the situation name as hover in plotlyformat_croprInternals:
{vdiffr}){styler} and {goodpractice}cat_situations and make it faaaast.id in bind_rows if providedLCS to remove a warningAdded labels so that situation names appear in ggplotly graphs
Fixed bug with successive argument:
Fixed save_plot_pdf function
bind_rows_sim and split_df2sim helper functions to either bind a list of simulations into a single data.frame or to split it back. Works also on observations.summary can now be grouped by crops. Useful for cases where we have different usms with different crops, and for intercropping.extract_plot for residues plotsAll crop models wrapped with CroptimizR can now automatically use CroPlotR.
For that, the sim_list element of the variable returned by the wrapper must have the attribute cropr_simulation, please refer to the guidelines for implementing a crop model R wrapper for CroptimizR for more details.
some bugs fixed (coloring for model comparison and overlapping variables, absence of Plant columns in obs and/or sim, ...)
license changed to CeCILL-C
NEWS.md file to track changes to the package.