Learn R Programming

NUETON (version 0.2.0)

plot_nue_compare: 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)

Value

A ggplot object.

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

Examples

Run this code
# 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