Skip to contents

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)

Arguments

filenames

A character vector of IFCB filenames in the format "DYYYYMMDDTHHMMSS_IFCBxxx".

Value

A data frame with columns: sample, full_timestamp, year, month, day, time, and ifcb_number.

Examples

filenames <- c("D20230314T001205_IFCB134", "D20230615T123045_IFCB135")
timestamps <- ifcb_convert_filenames(filenames)
print(timestamps)
#>                     sample           timestamp       date year month day
#> 1 D20230314T001205_IFCB134 2023-03-14 00:12:05 2023-03-14 2023     3  14
#> 2 D20230615T123045_IFCB135 2023-06-15 12:30:45 2023-06-15 2023     6  15
#>       time ifcb_number
#> 1 00:12:05     IFCB134
#> 2 12:30:45     IFCB135