Skip to contents

The summarize_temp function is used to summarize sub-daily temperature measurements to obtain mean daily temperature.

Usage

summarize_temp(data, dates, temperature)

Arguments

data

A data.frame, or data frame extension (e.g. a tibble).

dates

Column representing the date of temperature measurements.

temperature

Column representing temperature values.

Value

A data.frame with summarized daily temperature values.

Examples

library(hatchR)
summarize_temp(
  data = idaho,
  dates = date,
  temperature = temp_c
)
#> # A tibble: 1,826 × 2
#>    date       daily_temp
#>    <date>          <dbl>
#>  1 2010-12-01      0.417
#>  2 2010-12-02      0.591
#>  3 2010-12-03      0.602
#>  4 2010-12-04      0.289
#>  5 2010-12-05      0.419
#>  6 2010-12-06      0.439
#>  7 2010-12-07      0.699
#>  8 2010-12-08      0.761
#>  9 2010-12-09      0.941
#> 10 2010-12-10      0.855
#> # ℹ 1,816 more rows