Learn R Programming

bioRad (version 0.9.1)

doy_noy: Look up day of year (doy) or night of year (noy)

Description

Returns the day of year (doy) or night of year (noy) number for datetimes and various bioRad objects. The first night of the year is the night with datetime Jan 01 00:00:00 in the local time zone, so sunset on Jan 1 occurs on the second night of the year and New Years Eve on Dec 31 occurs on the first night of the new year.

Usage

doy(x, ..., method = "fast")

noy(x, ..., method = "fast")

# S3 method for default doy(x, lon, lat, ..., method = "fast")

# S3 method for default noy(x, lon, lat, ..., method = "fast")

# S3 method for vp doy(x, ..., method = "fast")

# S3 method for vp noy(x, ..., method = "fast")

# S3 method for vpts doy(x, ..., method = "fast")

# S3 method for vpts noy(x, ..., method = "fast")

# S3 method for vpi doy(x, ..., method = "fast")

# S3 method for vpi noy(x, ..., method = "fast")

# S3 method for pvol doy(x, ..., method = "fast")

# S3 method for pvol noy(x, ..., method = "fast")

Value

integer representing the ordinal day of year or night of year.

Arguments

x

A pvol, vp, vpts, or vpi object, or a base::as.POSIXct datetime.

...

Optional lat, lon arguments.

method

Method by which to do the time zone lookup. Either fast (default) or accurate. See lutz::tz_lookup_coords].

lon

Numeric. Longitude in decimal degrees.

lat

Numeric. Latitude in decimal degrees.

Examples

Run this code
# Get day of year of a vp object
noy(example_vp)

# Get night of year of a vp object
noy(example_vp)

# Get night of year of a vpts object
noy(example_vpts)

Run the code above in your browser using DataLab