sunCalc: Sunrise and sunset time

Description Usage Arguments Value Author(s) Examples

Description

given the latitude and longitude of any day calculate the time of sunrise and sunset. Aquired from..... the internet

Usage

1
sunCalc(d, lat, long)

Arguments

d

POSIX item representing the day of interest

lat

Latitude of location in decimal degrees

long

Longitude of location in decimal degrees

Value

returns a list with two levels

sunrise

a vector in the list that is composed of the hour of the day in decimal hours that the sun will rise

sunset

a vector in the list that is composed of the hour of the day in decimal hours that the sun will set

Author(s)

Connor F. White

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
day<-as.POSIXct("2016-01-01")
sunCalc(day,lat=33.5,long=-118.5)

#if we move the location
sunCalc(day,lat=40.5,long=-115)


#Or the values for the entire year
end<-as.POSIXct("2016-12-31")
days<-seq(day,end,by="day")
sunCalc(d=days,lat=33.5,long=-118.5)

ConnorFWhite/AssFunc documentation built on May 20, 2019, 4:07 p.m.