rskToc | R Documentation |
Decode table-of-contents file from a rsk file, of the sort used by some researchers at Dalhousie University.
rskToc(dir, from, to, debug = getOption("oceDebug"))
dir |
name of a directory containing a single table-of-contents file, with
|
from |
optional |
to |
optional |
debug |
optional integer to control debugging, with positive values indicating to print information about the processing. |
It is assumed that the .TBL
file contains lines of the form "File
\day179\SL08A179.023 started at Fri Jun 27 22:00:00 2008"
The first step is
to parse these lines to get day and hour information, i.e. 179 and 023 in the
line above. Then, recognizing that it is common to change the names of such
files, the rest of the file-name information in the line is ignored, and instead
a new file name is constructed based on the data files that are found in the
directory. (In other words, the "\\day179\\SL08A"
portion of the line is
replaced.) Once the file list is complete, with all times put into R format,
then (optionally) the list is trimmed to the time interval indicated by
from
and to
. It is important that from
and to
be in
the UTC
time zone, because that time zone is used in decoding the lines
in the .TBL
file.
A list with two elements: filename
, a vector of file names, and
startTime
, a vector of POSIXct()
times indicating the (real)
times of the first datum in the corresponding files.
file <- "~/data/archive/sleiwex/2008/moorings/m05/adv/sontek_202h/raw" table <- rskToc(file, from=as.POSIXct("2008-07-01 00:00:00", tz="UTC"), to=as.POSIXct("2008-07-01 12:00:00", tz="UTC")) print(table)
Dan Kelley
Other things related to rsk data:
[[,rsk-method
,
[[<-,rsk-method
,
as.rsk()
,
ctdFindProfilesRBR()
,
plot,rsk-method
,
read.rsk()
,
rsk
,
rsk-class
,
rskPatm()
,
subset,rsk-method
,
summary,rsk-method
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.