Tmax.mean: Calculate a mean of Tmax

Description Usage Arguments Details Value Examples

Description

Calculate a mean Tmax for each sub-group

Usage

1

Arguments

df

Data frame containing all Tmax for each sub-group.

Details

The data frame should contain a column named "Tmax" whith all Tmax and a column named "ID" to identify which Tmax belong to which sug-group.

Value

Return the inputed data frame with a new column names "Tmax_mean".

Examples

1
2
3
4
5
ID = c(rep("A", times=5), rep("B", times=5), rep("A", times=5), rep("B", times=5))
Tmax = c(rep(2.5, times=5), rep(2.7, times=5), rep(3.2, times=5), rep(3.4, times=5))
DOY = c(rep(102, times=10), rep(103, times=10))
df <- data.frame(DOY, ID, Tmax)
Tmax.mean(df)

TDPanalysis documentation built on Feb. 28, 2020, 9:09 a.m.