gen_tpd: Generate TPD

Description Usage Arguments Value Examples

View source: R/gen.R

Description

Generates a thermal-performance dataset (TPD) based on some thermal-performance traits (TPTs)

Usage

1
gen_tpd(tpts, samples, error)

Arguments

tpts

A TPTs tibble with trait and value as columns

samples

The number of samples to be generated.

error

The amount of error to be introduced in units of standard deviation.

Value

A thermal-performance dataset (TPD) with temperature (t) and performance as columns

Examples

1
2
3
4
5
6
7
tpd <- gen_base_tpd(topt = 30, tb = 3, skw = -1, ctmin = 20, ctmax = 35, pmax = 10, pmin = 0.1)
fit <- fit_tpd(tpd)
tpc <- gen_tpc(fit)
tpts <- get_tpts(tpc, pmin = 0.1)
tpd <- gen_tpd(tpts, samples = 10, error = 0.75)
plot(tpd, pch = 19, ylim = c(0, max(tpc$p,tpd$p, na.rm = T)), xlab = "T", cex =1.25)
lines(tpc, col = "royalblue", lwd = 1.25)

ggcostoya/limon documentation built on April 27, 2021, 10:09 p.m.