Learn R Programming

calcal (version 1.0.0)

location: Locations

Description

Create a location object. These are used for calculating the timing of astronomical events such as sunrise and sunset.

Usage

location(
  latitude = numeric(),
  longitude = numeric(),
  elevation = numeric(),
  zone = numeric()
)

Value

A location vector object

Arguments

latitude

A numeric vector of latitudes

longitude

A numeric vector of longitudes

elevation

A numeric vector of elevations above sea level (in metres)

zone

A numeric vector of time zones (in hours, relative to UTC)

Examples

Run this code
melbourne <- location(-37.8136, 144.9631, 31, 10)
sunrise("2025-01-01", melbourne)

Run the code above in your browser using DataLab