repo.spld: Automatic report for a split plot design

View source: R/repo_spld.R

repo.spldR Documentation

Automatic report for a split plot design

Description

Produces an automatic report for selected traits in an experiment with a split-plot or a split-split-plot design.

Usage

repo.spld(
  traits,
  mpf,
  spf,
  sspf = NULL,
  rep,
  dfr,
  pe = FALSE,
  title = NULL,
  subtitle = NULL,
  author = "International Potato Center",
  format = c("html", "word", "pdf")
)

Arguments

traits

The traits to analize.

mpf

The main plots factor.

spf

The sub plots factor.

sspf

The sub sub plot factor (if any).

rep

The replications.

dfr

The name of the data frame.

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".

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 split-plot or a split-split-plot design and explains the results.

Value

It returns an explanation about the split-plot or a split-split-plot design fitted model.

Author(s)

Raul Eyzaguirre.

Examples

# Create designs
mpf <- paste0("mpf", 1:2)
spf <- paste0("spf", 1:3)
sspf <- paste0("sspf", 1:4)
d1 <- cr.spld(c("mpf", "spf"), list(mpf, spf), 3)$book
d2 <- cr.spld(c("mpf", "spf", "sspf"), list(mpf, spf, sspf), 2)$book
# Some random data
d1$yield <- rnorm(18, 10)
d2$yield <- rnorm(48, 10)
# Fit models
repo.spld("yield", "mpf", "spf", NULL, "block", d1)
repo.spld("yield", "mpf", "spf", "sspf", "block", d2)

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