plot.data_agro_LF gets ggplot to describe the data

# S3 method for data_agro_LF
plot(x, plot_type = "boxplot",
  vec_variables = NULL, f_grid = NULL, ...)

Arguments

x

The data frame. It should come from format_data_PPBstats.data_agro_LF

plot_type

the type of plot you wish. It can be :

  • "barplot", where sd error are displayed

  • "boxplot"

vec_variables

vector of variables to display

f_grid

facet grid to add, possible value is "year"

...

further arguments passed to or from other methods

Value

The function returns a list with ggplot objects for each variable of vec_variables divided into three elements:

  • local_foreign_merged, i.e. a single plot with version for all location merged

  • local_foreign_merged_per_location, i.e. a single plot with version for each location

  • local_foreign_per_location, i.e. a list of plots for each location with all version separated

When argument mean_comparison is not NULL, it returns a plot with stars of significant differences.

Details

S3 method. See the book for more details here.

See also