Passer au contenu

This function automatically generates a bar graph from observation or experimental data.

Utilisation

plot_xpbar(
  self,
  stats = NULL,
  calculation_choices = NULL,
  one_plot = TRUE,
  text_stat = TRUE,
  max_y = NULL,
  bar_color = NULL,
  bar_width = 0.7,
  border_tnt = FALSE,
  show_tnt = TRUE,
  code_tnt = "TNT",
  show_errorbar = TRUE,
  show_data = TRUE,
  short_names = TRUE,
  ...
)

Arguments

self

An instance of the UserData R6 class

stats

character, the name of a stats list inside self$stats.

calculation_choices

vector of character, choice(s) of calculation to plot. For example c("FA UN_BER_PC","IA UN_BER_PC")

one_plot

boolean. If TRUE, all calculations are plot on an unique plot using fill argument, else each calculation is on a independent plot using factet

text_stat

boolean. If TRUE, an annotation is added to the plot with the test done and its p-value

max_y

Upper limit of the y axis. If NULL, automatic adjustment.

bar_color

Bar fill colour.

bar_width

bar width

border_tnt

if true, the border color is set as red for TNT

show_tnt

if false, TNT are removed from the graph

code_tnt

a string to identify in TNT in the row of the dataframe by default "TNT"

show_errorbar

display of error bars

show_data

display data points

short_names

to have shorter names for fill removing the last part of the string after the last space occurence

...

other parameters for labs (title, x, y,fill)

Valeur de retour

a barplot