View source: R/detect_io_type.R
detect_io_type | R Documentation |
This utility function tries to detect automatically if a
provided file is of "clm"
, "meta"
, or "raw"
file type. NetCDFs and
simple text formats such as ".txt" or ".csv" are also detected.
detect_io_type(filename)
filename |
Character string naming the file to check. |
Character vector of length 1 giving the file type:
"cdf" for a NetCDF file (classic or NetCDF4/HDF5 format).
"clm" for a binary LPJmL input/output file with header.
"meta" for a JSON meta file describing a binary LPJmL input/output file.
"raw" for a binary LPJmL input/output file without header. This is also the default if no other file type can be recognized.
"text" for any type of text-only file, e.g. ".txt" or ".csv"
## Not run:
detect_io_type(filename = "filename.clm")
# [1] "clm"
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.