repo.f: Automatic report for a factorial experiment

View source: R/repo_f.R

repo.fR Documentation

Automatic report for a factorial experiment

Description

Produces an automatic report for selected traits in a factorial experiment with a CRD or RCBD.

Usage

repo.f(
  traits,
  factors,
  rep,
  dfr,
  maxp = 0.1,
  pe = FALSE,
  se = FALSE,
  title = "Automatic report for a factorial experiment",
  subtitle = NULL,
  author = "International Potato Center",
  format = c("html", "word", "pdf")
)

Arguments

traits

The traits to analize.

factors

The factors.

rep

The replications or blocks, NULL for a CRD.

dfr

The name of the data frame containing the data.

maxp

Maximum allowed proportion of missing values to estimate, default is 10%.

pe

Logical. If "pe = TRUE" multiple comparison tests for principal effects are included even if interaction is significat, only in the case of 2 factors. Default to "pe = FALSE".

se

Logical. If "se = TRUE" multiple comparison tests for simple effects are included even if interaction is not significat, only in the case of 2 factors. Default to "se = FALSE".

title

Report title.

subtitle

Report subtitle.

author

Report author.

format

The output file format for the report, "html" by default. Other options are "word" and "pdf".

Details

It fits a linear model for a factorial experiment with a CRD or RCBD for the selected traits. If data is unbalanced, missing values are estimated up to an specified maximum proportion, 10% by default. All factors are considered as fixed.

Value

It returns an automatic report for the factorial experiment with a CRD or RCBD fitted model.

Author(s)

Raul Eyzaguirre.

Examples

## Example 1: Two factors factorial
repo.f(c("asc.dw", "asc.fw"), c("geno", "treat"), NULL, asc)

## Example 2: Three factors factorial
# Create design with 3 factors
fnames <- c('A', 'B', 'C')
flevels <- list(c('a1', 'a2'), c('b1', 'b2'), c('c1', 'c2', 'c3'))
temp <- cr.f(fnames, flevels, 'rcbd', 2, 10)$book
# Simulate random data
temp$y <- rnorm(24)
# Run report
repo.f('y', c('A', 'B', 'C'), 'block', temp)

reyzaguirre/pepa documentation built on April 20, 2024, 3:50 a.m.