name_join: create "'.gz"-filenames from a list or dataframe

View source: R/name_join.r

name_joinR Documentation

create ''.gz'-filenames from a list or dataframe

Description

creates filenames based on a list or dataframe with the (header)-names:

area source parameter resolution timestep date1 date2 option

by aligning the defined filetype:

e.g. area_source_parameter_resolution_timestep_date1_date2.option.filetype

Usage

name_join(parts,filetype='gz')

Arguments

parts

a list or dataframe with the parts:

area

, the region keyword

source

, the data source

param

, the parameter saved in the '.gz'-file. Can only be one value!

resolution

, the spatial resolution

timestep

, the temporal resolution

date1 & date2

, the temporal resolution (the time interval covered).

option

a character string holding supplmentary information of '.gz'-file treatment

filetype

character string inidicating the filtype to be checked. ('.gz' by default)

Author(s)

Herve Demarq, translated from IDL by Robert K. Bauer

See Also

See check_gzfiles to return summary of available '.gz'-files and name_split to split '.gz'-filenames

Examples

## Example: read and plot '.gz'-file
path <- system.file("test_files", package="oceanmap")
gz.files <- Sys.glob(paste0(path,'/*.gz')) # load sample-'.gz'-files
check_gzfiles(folder=path) # return file summary-table

# return summary of availble '.gz'-files
# suffix-column corresponds to option column of the name_join-call
# addition n-column returns the number of available files per filetype
check_gzfiles(gz.files)

## Example: split and rejoin '.gz'-filenames
name_split(gz.files) # return summary-table per file
name_join(name_split(gz.files))

oceanmap documentation built on Nov. 10, 2023, 5:08 p.m.

Related to name_join in oceanmap...