Graph summary data into bar o line plot

plot_smr(
  data,
  type = NULL,
  x = NULL,
  y = NULL,
  groups = NULL,
  xlab = NULL,
  ylab = NULL,
  glab = NULL,
  limits = NULL,
  brakes = NULL,
  sig = NULL,
  error = NULL,
  legend = NULL
)

Arguments

data

Data frame with summary data. See details.

type

Type of plot (default = "bar"). Others: "line".

x

Variable in the x axis.

y

Variable in the y axis.

groups

Groups the x axis (legend).

xlab

Label of x axis.

ylab

Label of y axis.

glab

Label of groups or legend.

limits

Limits max and min.

brakes

Units for break the limits.

sig

Comparison test values (default = "sig").

error

Variable used for error bars.

legend

Position of legend (default = "top"). Others: "left", "right", "bottom", "none".

Value

plot

Details

If the table is a out put of mean_comparison(graph_opts = TRUE) function. Its contain all the parameter for the plot.

Examples

library(inti) library(googlesheets4) if (gs4_has_token()) { url <- paste0("https://docs.google.com/spreadsheets/d/" , "15r7ZwcZZHbEgltlF6gSFvCTFA-CFzVBWwg3mFlRyKPs") # browseURL(url) gs <- as_sheets_id(url) (data <- gs %>% range_read("LA")) plot_smr(data) plot_smr(data , type = "bar" , limits = c(0, 14000) , brakes = 2000 , sig = "sig" , error = "ste" ) }