Learn R Programming

LakeMetabolizer (version 1.5.5)

sun.rise.set: Calculates the time of sunrise and sunset

Description

Calculates the time of sunrise and sunset based on latitude and date.

Usage

sun.rise.set(datetimes, lat)

Value

A 2-column data frame, first column sunrise, second column sunset, as POSIXct format in standard time. Value is NA when there is no defined sunrise or sunset for that day (winter/summer at high and low latitudes).

Arguments

datetimes

Vector of dates as POSIXct or POSIXlt (see DateTimeClasses) format

lat

Single latitude value of site. South should be negative, north positive

Author

Luke A. Winslow

References

Iqbal, Muhammad. 1983. An Introduction to Solar Radiation. Elsevier.

See Also

is.night is.day

Examples

Run this code
sun.rise.set(lat=40.75,datetimes=as.POSIXlt('2013-03-31'))

Run the code above in your browser using DataLab