contrasts_to_factors: Convert SEDesign contrasts to data.frame of design factors

contrasts_to_factorsR Documentation

Convert SEDesign contrasts to data.frame of design factors

Description

Convert SEDesign contrasts to data.frame of design factors

Usage

contrasts_to_factors(
  contrast_names = NULL,
  sedesign = NULL,
  factor_names = NULL,
  factor_sep = "_",
  rowname = c("contrast", "comp"),
  verbose = FALSE,
  ...
)

Arguments

contrast_names

character vector of contrast names

sedesign

SEDesign object, used when contrast_names is not supplied.

factor_names

character vector of colnames to use for the resulting data.frame, typically the name of each experimental factor.

factor_sep

character string delimited between factors used in each group name. It is passed to contrast2comp() as contrast_factor_delim.

verbose

logical indicating whether to print verbose output.

...

additional arguments are passed to contrast2comp() as relevant.

Value

data.frame with factors in each column, and values indicating either individual factor levels, or comparison of two factor levels.

See Also

Other jam experiment design: check_sedesign(), contrast2comp(), contrast_colors_by_group(), contrast_names_to_sedesign(), contrasts_to_venn_setlists(), draw_oneway_contrast(), draw_twoway_contrast(), filter_contrast_names(), groups_to_sedesign(), plot_sedesign(), sedesign_to_factors(), validate_sedesign()

Examples

group_names <- paste0(
   rep(c("UL3", "dH1A", "dH1B"), each=5), "_",
   c("Veh", "DEX", "PMA", "SF", "Ins"))
sedesign <- groups_to_sedesign(group_names)
contrasts_to_factors(sedesign)


jmw86069/jamses documentation built on Nov. 4, 2024, 9:25 p.m.