get_latest_output_date_index: get the latest index for given an output dir and a date

View source: R/utils_io.R View source: R/make_versioned_dir.R

get_latest_output_date_indexR Documentation

get the latest index for given an output dir and a date

Description

directories are assumed to be named in YYYY_MM_DD.VV format with sane year/month/date/version values.

directories are assumed to be named in YYYY_MM_DD.VV format with sane year/month/date/version values.

Usage

get_latest_output_date_index(dir, date)

get_latest_output_date_index(dir, date)

Arguments

dir

[chr] path to directory with versioned dirs

date

[chr] character in be YYYY_MM_DD format

Value

largest version in directory tree or 0 if there are no version OR the directory tree does not exist

[dbl] largest version in directory tree or 0 if there are no version OR the directory tree does not exist

Examples

get_latest_output_date_index("tests/testthat/fixtures/versioned-dirs/nested/1999_09_09", date = "1999_09_09") # expect 2

epi-sam/SamsElves documentation built on June 12, 2025, 7 a.m.