Ir al contenido

This function calculates herbivory metrics from a given dataset and creates a corresponding ggplot.

Uso

herbivory(
  data,
  bar_color = "blue",
  point_fill = "green",
  point_color = "black",
  point_alpha = 0.9
)

Argumentos

data

A data frame containing the herbivory data with columns including 'comido_pct', 'id_individuo', and other relevant variables.

bar_color

The color for the bar in the ggplot. Default is blue.

point_fill

The fill color for points in the ggplot. Default is green.

point_color

The outline color for points in the ggplot. Default is black.

point_alpha

The alpha (transparency) for points in the ggplot. Default is 0.9.

Valor

A list containing:

  • 'damage': A tibble with herbivory metrics.

  • 'plot_damage': A ggplot object displaying herbivory metrics.