parse_ts_archive_name: Split archived file path into its contents

parse_ts_archive_nameR Documentation

Split archived file path into its contents

Description

Subsidiary to parse_ts_path, which is the exported function

Usage

parse_ts_archive_name(file_name, out = c("ts_name", "is_archive",
  "creation_date"), use_names = length(file_name) > 1)

Arguments

file_name

a valid file basename for ts file

out

a character for desired output ('dir_name','file_name', 'site_name', 'ts_name', 'creation_date' or any of the out names from parse_ts_name or parse_site_name)

use_names

logical. Should the return vector be named according to the input values?

Value

a character

Examples

mda.streams:::parse_ts_archive_name(
  c('ARCHIVE_20160324120400-nwis_05406479-ts_doobs_nwis.tsv.gz', 
    'nwis_05406480-ts_doobs_nwis.tsv.gz'), use_names=FALSE)

USGS-R/mda.streams documentation built on June 3, 2023, 8:43 a.m.