fitReg: a function to model the phyllocron using a linear regression

Description Usage Arguments Details Value Examples

View source: R/modelisation.R

Description

this function models each plant of a dataset using a regression to extract the slope (i.e. phyllocron: the rate of leaf appearance)

Usage

1
fitReg(datain, trait, xtime, myylim, reference, myxlab)

Arguments

datain

input dataframe (wide format, as many columns as variables)

trait

variable to modelize (example visible_leaf, F_visible)

xtime

character, name of thermal time column in the input dataset (example thermaltime)

myylim

maximum value of y-axis for graphic

reference

character, a column name indicating an unique identifiant of plant (example: Ref == concatenation of experimentAlias-Line-Position-scenario)

myxlab

character, a x label for the output graphics

Details

the input dataset must contain a thermalTime column (numeric data) and a Ref column (unique id)

Value

a list of two elements and the graphics of the regression

1: a dataframe of the predictions of the slope for each plant (phyllocron)

2: a list of fitted models for each plant for diagnostics purposes

Examples

1
2
3
4
5
# Take a while...
 resu<-fitReg(datain=plant2,trait="F_visible",xtime="thermalTime",
              myylim=22,reference="Ref",
              myxlab="Thermal Time degD")
 str(resu)

sanchezi/phisStatR documentation built on Nov. 14, 2019, 7:10 p.m.