adpRdiFileTrim {oce}R Documentation

Trim an RDI adp File

Description

Create an RDI adp file by copying the first n data chunks (starting with byte 0x7f 0x7f) of another such file. This can be useful in supplying small sample files for bug reports.

Usage

adpRdiFileTrim(infile, n = 100L, outfile, debug = getOption("oceDebug"))

Arguments

infile

name of an RDI file.

n

integer indicating the number of data chunks to keep. The default is to keep 100 chunks, a common choice for sample files.

outfile

optional name of the new RDI file to be created. If this is not supplied, a default is used, by adding ⁠_trimmed⁠ to the base filename, e.g. if infile is "a.000" then outfile will be a_trimmed.000.

debug

an integer value indicating the level of debugging. If this is 1L, then a brief indication is given of the processing steps. If it is > 1L, then information is given about each data chunk, which can yield very extensive output.

Value

adpRdiFileTrim() returns the name of the output file, outfile, as provided or constructed.

Sample of Usage

# Can only be run by the developer, since it uses a private file.
file  <- "~/data/archive/sleiwex/2008/moorings/m09/adp/rdi_2615/raw/adp_rdi_2615.000"
if (file.exists(file)) {
    adpRdiFileTrim(file, 9L, "test.000")
}

Author(s)

Dan Kelley

See Also

Other things related to adp data: [[,adp-method, [[<-,adp-method, ad2cpCodeToName(), ad2cpHeaderValue(), adp-class, adpAd2cpFileTrim(), adpConvertRawToNumeric(), adpEnsembleAverage(), adpFlagPastBoundary(), adp_rdi.000, adp, applyMagneticDeclination,adp-method, as.adp(), beamName(), beamToXyzAdpAD2CP(), beamToXyzAdp(), beamToXyzAdv(), beamToXyz(), beamUnspreadAdp(), binmapAdp(), enuToOtherAdp(), enuToOther(), handleFlags,adp-method, is.ad2cp(), plot,adp-method, read.adp.ad2cp(), read.adp.nortek(), read.adp.rdi(), read.adp.sontek.serial(), read.adp.sontek(), read.adp(), read.aquadoppHR(), read.aquadoppProfiler(), read.aquadopp(), rotateAboutZ(), setFlags,adp-method, subset,adp-method, subtractBottomVelocity(), summary,adp-method, toEnuAdp(), toEnu(), velocityStatistics(), xyzToEnuAdpAD2CP(), xyzToEnuAdp(), xyzToEnu()

Other functions that trim data files: adpAd2cpFileTrim(), advSontekAdrFileTrim(), oceFileTrim()


[Package oce version 1.8-2 Index]