setLocation: Generate a location object

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Construct an object that contains a geographical location given by the latitude, longitude, and (optionally), the longitude of the nearest timezone border. This object is required in setMet.

Usage

1
setLocation(lat = NA, long = 0, tzlong = NA)

Arguments

lat

Latitude (degrees, southern hemisphere negative)

long

Longitue (degrees)

tzlong

Optional. Longitude of the nearest timezone border (degrees).

Details

If the longitude of the nearest time zone border (tzlong) is not set, it is assumed that all times are in 'local apparent time' (LAT), where maximum solar altitude is reached at noon. If it is set, it is used to calculate the time offset between clock time and solar time.

If lat and long are not given, a location can be selected from a simple map of the world. The maps package is needed for this utility.

You can also plot the location on a map of the world (see Examples).

Value

An object of class yplocation.

Author(s)

Remko Duursma

See Also

setMet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Set a location:
sydney <- setLocation(lat=-33.5, long=152, tzlong=150)

## Not run: 
# Set a location from a map:
somewhere <- setLocation()

# Plot locations:
plot(sydney)

## End(Not run)

YplantQMC documentation built on May 2, 2019, 5:50 p.m.