simulate_trend: Simulate trends

Description Usage Arguments Value

View source: R/simulation.R

Description

Underlying function for simulating different types of time-course trends. Each trend supports parameter generation from one or two sets of parameter limits.

Usage

1
simulate_trend(n, n.samples, f_trend, par1, par2 = NULL, p = 0.5)

Arguments

n

Number of trends to generate.

n.samples

Number of timepoints within each trend.

f_trend

Function that taxes x values and a vector of parameters and generates a corresponding set of y values.

par1

Parameter vector of lower and upper bounds for first set of trends.

par2

Optional parameter vector of lower and upper bounds for second set of trends.

p

Proportion of trends to generate using par1 vs. par2. Note, p is ignored if par2 is not specified.

Value

A dataframe with each row representing a metabolite concentration time-course scaled between 0 and 1. The corresponding x variables are assumed to be equally spaced between 0 and 1 i.e. x <- seq(0, 1, length.out=n.samples).


ssokolen/metcourse documentation built on May 30, 2019, 8:43 a.m.