View source: R/parseFilenames.R
parseFilenames | R Documentation |
parse sensorgnome filenames into components
parseFilenames(f, base = basename(f), checkDOS = TRUE)
f |
character vector of filenames with full path |
base |
character vector of file basenames; these default to
|
checkDOS |
if TRUE, the default, try to correct DOS 8.3-style filenames; if FALSE, return NA for rows corresponding to these. |
a dataframe of components, with one row per filename and these columns:
prefix: human readable short site name
serno: receiver serial number; "SG-" followed by 12 alphanumeric characters e.g. 1315BBBK2156, or possibly with an appended "_N" where N is 1, 2, ... for disentangling serial number collisions. Alphabetic characters are converted to upper case.
bootnum: boot count (integer)
tsString: timestamp in YYYY-MM-DDTHH-MM-SS.SSSS format
ts: timestamp embedded in name (double, with class c("POSIXt", "POSIXct")
)
tsCode: timestamp code ('P' means before GPS fix, 'Z' means accurate to 1e-6 s, 'Y' to 1e-5s, 'X' to 1e-4s, ..., 'T' to 1s)
port: character; port label, if this file is associated with a single port (e.g. a .WAV file); "all" if all ports
extension: character extension of uncompressed file; e.g. ".txt"; lower case
comp: character; file compression type, if any: "", or ".gz"; lower case
:
returns NULL if no filenames match regex; otherwise, return value has rows filled with NA for any filenames not matching the expected form
serial number collisions are resolved based on prefix and possibly other
filename components - see the
variable sernoCollisionFixes
. Resolution occurs by adding a suffix to the serno
field returned by this function, but does not rename files.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.