map_experiment: Map a data frame on an experiment

Description Usage Arguments Details Examples

View source: R/map_experiment.R

Description

Maps the data of a data frame on the structure on an object of class experiment.

Usage

1

Arguments

df

A data frame containing variables and parameters values for a number of simulations we wish to use for the experiment exp.

exp

An object of class experiment. See Details for constraints on this object.

Details

The names of the columns of the data frame should correspond to the names of the variables and parameters of the experiment. This can work only if one of the following conditions is met:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# First situation: the sets of names of the data frame and the experiment
# are exactly the same:
if (exists("sir1", inherits = FALSE)) rm(sir1)
exp <- sir1
df <- as.data.frame(repl(sir1, 3))
map_experiment(df, exp)
# Second situation: the names of the data frame are included in the names of
# the experiment AND the numbers of rows of the data frame and the experiment
# are equal:
exp <- repl(sir1, 3)
df <- as.data.frame(exp)[, c(1, 3, 6)]
map_experiment(df, exp)

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