plot_nue_compare: Plot NUE Comparison

View source: R/viz_nue.R

plot_nue_compareR Documentation

Plot NUE Comparison

Description

Creates a bar chart comparing NUE metrics across different groups (e.g., Treatments or Sites). Includes error bars (Standard Error).

Usage

plot_nue_compare(data, x_var, y_var)

Arguments

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").

Value

A ggplot object.

Examples

# 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")

NUETON documentation built on Dec. 18, 2025, 1:07 a.m.