Skip to contents

Plotting function for diet comparison summary

Usage

plot_diet_comparison_percent(plot_obj, title_text, axis_x_text, axis_y_text)

Arguments

plot_obj

an object of class <diet_comparison_percent>

title_text

Title for the plot

axis_x_text

X axis title

axis_y_text

Y axis title

Value

A plot

Examples

ddd <- prep_diet_comparison_percent(data_dietsummary = data_newdiet)
plot_diet_comparison_percent(plot_obj = ddd,
                          title_text = 'Percent change',
                         axis_x_text = 'Food groups',
                          axis_y_text = 'Percent')
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to min; returning Inf
#> Error in geom_bar(position = "dodge", stat = "identity", alpha = 0.7): Problem while computing aesthetics.
#>  Error occurred in the 1st layer.
#> Caused by error:
#> ! object 'perc_change' not found