Learn R Programming

bioRad (version 0.5.2)

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

Description

Look up the day of year (doy) or night of year (noy) for datetimes and various bioRad objects.

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")

Arguments

x

pvol, vp, vpts, vpi, or a date inheriting from class POSIXct or a string interpretable by as.POSIXct.

...

optional lat,lon arguments.

method

method by which to do the time zone lookup. Either "fast" (default) or "accurate", see tz_lookup_coords.

lon

numeric. Longitude in decimal degrees.

lat

numeric. Latitude in decimal degrees.

Details

First night of the year is the night with datetime Jan 01 00:00:00 in the local time zone, i.e. 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.

Examples

Run this code
# NOT RUN {
# night of year of a profile (vp object):
noy(example_vp)

# day of year of a profile (vp object):
noy(example_vp)

# night of year of a vertial profile time series (vpts object):
noy(example_vpts)
# }

Run the code above in your browser using DataLab