fullfact: Populate an experiment with values

Description Usage Arguments Details Value Examples

View source: R/fullfact.R

Description

Generates a full experimental design for an experiment.

Usage

1
fullfact(xprmt, ...)

Arguments

xprmt

An object of class experiment.

...

Vectors used to overwrite columns of xprmt. These arguments should be named and their names should match the names of xprmt.

Details

This function is basically a wrapper around the expand.grid function applied to all the column of the inputed experiment object. Any of these columns can be replaced by user-defined vectors of values, see examples.

Value

An object of class experiment with a full factorial design of the inputed experiment.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
sir1 <- load_experiment("sir",
                        system.file("models", "sir.gaml", package = "rama"))
# 1. First type of use: tranforming an experiment into one with a full
# factorial design: (use the function `repl`, if you want more details `?repl`)
sir2 <- repl(sir1, 3)
sir2$p_S0 <- 1:3
sir2
sir2[1, 2] <- 2
# "sir2" is not full factorial:
sir2
# this is:
fullfact(sir2)

# 2. Second type of use: by providing vectors of values to overwrite elements
# of the "experiment" object and then expand it into full factorial design:
fullfact(sir2, p_S0 = 1:3, p_I0 = 4:5)

r-and-gama/rama documentation built on July 19, 2019, 9:49 p.m.