date_name: Flip between WeStCOMS file names and dates

View source: R/date_name.R

date_nameR Documentation

Flip between WeStCOMS file names and dates

Description

This function converts a date to the 6 digit code that relates that date to a WeStCOMS file name (or vice versa).

Usage

date_name(x, define = "date_name")

Arguments

x

A vector of dates or date names to be converted.

define

A character that specifies whether 'x' is to be converted from a date to a date_name (define = "date_name") or from a date_name to a date (define = "date").

Author(s)

Edward Lavender

Examples

# 1) Extract the WeStCOMS file name as a numeric object from some dates:
date_name(x = as.Date(c("2016-03-01", "2016-03-02")), define = "date_name")

# 2) Define a sequence of dates from WeStCOMS file names:
date_name(x = c(160101, 170101), define = "date")

edwardlavender/fvcom.tbx documentation built on Nov. 26, 2022, 10:28 p.m.