powered by
Creates a bar chart comparing NUE metrics across different groups (e.g., Treatments or Sites). Includes error bars (Standard Error).
plot_nue_compare(data, x_var, y_var)
A ggplot object.
A dataframe containing the results.
The column name to group by (e.g., "Treatment", "Year").
The NUE metric to plot (e.g., "AE", "NRE").
# Create dummy data df <- data.frame( Treat = c("A", "A", "B", "B"), AE = c(10, 12, 20, 22) ) # Plot plot_nue_compare(df, x_var = "Treat", y_var = "AE")
Run the code above in your browser using DataLab