ifcb_convert_filenames {iRfcb}R Documentation

Convert IFCB Filenames to Timestamps

Description

This function converts IFCB filenames to a data frame with separate columns for the sample name, full timestamp, year, month, day, time, and IFCB number. ROI numbers are included if available.

Usage

ifcb_convert_filenames(filenames, tz = "UTC")

Arguments

filenames

A character vector of IFCB filenames in the format "DYYYYMMDDTHHMMSS_IFCBxxx" or "IFCBxxx_YYYY_DDD_HHMMSS". Filenames can optionally include an ROI number, which will be extracted if present.

tz

Character. Time zone to assign to the extracted timestamps. Defaults to "UTC". Set this to a different time zone if needed.

Value

A tibble with the following columns:

If the roi column is empty (all NA), it will be excluded from the output.

Examples

filenames <- c("D20230314T001205_IFCB134", "D20230615T123045_IFCB135")
timestamps <- ifcb_convert_filenames(filenames)
print(timestamps)


[Package iRfcb version 0.5.1 Index]