| plot_nue_compare | R Documentation |
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)
data |
A dataframe containing the results. |
x_var |
The column name to group by (e.g., "Treatment", "Year"). |
y_var |
The NUE metric to plot (e.g., "AE", "NRE"). |
A ggplot object.
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.