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

Description Usage Arguments Author(s) See Also Examples

View source: R/name_join.r

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

1
name_join(parts,filetype='gz')

Arguments

parts

a list or dataframe with the parts:

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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 March 23, 2020, 5:06 p.m.

Related to name_join in oceanmap...