fitLocfit: a function to model curve of a dataset using a local...

Description Usage Arguments Details Value Examples

View source: R/modelisation.R

Description

this function models each curve of a dataset using a local regression on biovolume, plant height or leaf area trait and extracts predictions at specific thermal times

Usage

1
fitLocfit(datain, trait, xtime, myylim, tt, reference, myxlab)

Arguments

datain

input dataframe

trait

character, trait of interest to model (example biovolume, PH ...)

xtime

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

myylim

numeric, max value of y-axis , varies according to trait

tt

numeric vector of thermal times at which predictions are recovered

reference

character, a column name indicating an unique identifiant of plant in the input dataset (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 dataframe of the predictions at tt thermal times for each plant of the input data set and the graphics of the smoothing curves

Examples

1
2
3
4
5
6
# Take a while...
 myThermalTimes<-c(24,30)
 resu<-fitLocfit(datain=plant1,trait="biovolume",xtime="thermalTime",
                 myylim=700,tt=myThermalTimes,reference="Ref",
                 myxlab="Thermal Time degD")
 str(resu)

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