Graph summary data into bar o line plot

plot_smr(
  data,
  type = NULL,
  x = NULL,
  y = NULL,
  group = NULL,
  xlab = NULL,
  ylab = NULL,
  glab = NULL,
  ylimits = NULL,
  xrotation = c(0, 0.5, 0.5),
  xtext = NULL,
  gtext = NULL,
  legend = "top",
  sig = NULL,
  error = NULL,
  color = TRUE,
  opt = NULL
)

Arguments

data

Output from ger_testcomp function

type

Type of graphic. "bar" or "line"

x

Axis x variable

y

Axis y variable

group

Group variable

xlab

Title for the axis x

ylab

Title for the axis y

glab

Title for the legend

ylimits

limits of the y axis

xrotation

Rotation in x axis c(angle, h, v)

xtext

Text labels in x axis

gtext

Text labels in group

legend

the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector)

sig

Column with the significance

error

Show the error bar ("ste" or "std").

color

colored figure (TRUE), otherwise black & white (FALSE)

opt

Add news layer to the plot

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

if (FALSE) { library(inti) library(gsheet) url <- paste0("https://docs.google.com/spreadsheets/d/" , "15r7ZwcZZHbEgltlF6gSFvCTFA-CFzVBWwg3mFlRyKPs/" , "edit#gid=172957346") # browseURL(url) fb <- gsheet2tbl(url) yrs <- yupana_analysis(data = fb , response = "hi" , model_factors = "geno*treat" , comparison = c("geno", "treat") ) yrs$meancomp %>% plot_smr(type = "bar" , x = "geno" , y = "hi" , group = "treat" , ylimits = c(0, 1, 0.1) , opt = "theme_minimal()" ) + facet_grid(.~ treat) }