| main_effects {ggDoE} | R Documentation | 
Obtain main effect plots in a factorial design
Description
Obtain main effect plots in a factorial design
Usage
main_effects(
  design,
  response,
  exclude_vars = c(),
  n_columns = 2,
  color_palette = NA,
  alpha = 1,
  direction = 1,
  showplot = TRUE
)
Arguments
| design | Design of experiment (Factorial Design) | 
| response | A character string indicating the response of the data | 
| exclude_vars | A vector containing variables to exclude | 
| n_columns | number of columns for facet grid. Default is 2 | 
| color_palette | A character string indicating the color map option to use. Eight options are available: "viridis","cividis","magma","inferno","plasma","rocket","mako","turbo" | 
| alpha | The alpha transparency, a number in [0,1] | 
| direction | Sets the order of colors in the scale. If 1, the default, colors are ordered from darkest to lightest. If -1, the order of colors is reversed | 
| showplot | logical indicating to show the main effect plots. If false, a list of data.frames is returned used to obtain the main effects for each factor. Default is TRUE | 
Value
Main effects plots, or a list of tibble with calculated main effects for each factors if showplot=FALSE.
Examples
main_effects(original_epitaxial,response='s2',exclude_vars = c('ybar','lns2'))
main_effects(original_epitaxial,response='ybar',exclude_vars=c('A','s2','lns2'),n_columns=3)