View source: R/create-daylengths.R
create_daylength_df | R Documentation |
Generate a data frame of day lengths for given latitudes.
The package geosphere
is required to use this function.
create_daylength_df(lat, dates, .quiet = FALSE)
lat |
Data frame with the fields |
dates |
Dates that should be processed. |
.quiet |
If |
A data frame with the columns date
, station
and daylength
.
create_daylength_rst()
# dates of interest
date_start <- as.Date('2020-01-01')
date_end <- as.Date('2020-12-31')
# calculate day length
dl <- create_daylength_df(barrks_data('station_coords'),
seq(date_start, date_end, by = 'day'),
.quiet = TRUE)
# print day lengths of station 'Freiburg'
dl[dl$station == 'Freiburg',]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.