Create an RDI adp file by copying either the first n
data chunks or the
chunks listed in indices
from a given RDI file to a new RDI file.
This can be useful in supplying small sample files for bug reports,
or to speed up further processing of large datasets of which only
a small portion is of interest. Note that the order of the parameters
was changed in 2025-05-26, at which time the indices
parameter
was also added.
Usage
adpRdiFileTrim(infile, outfile, n, indices, debug = getOption("oceDebug"))
Arguments
- infile
name of an RDI file.
- 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. ifinfile
is"a.000"
thenoutfile
will bea_trimmed.000
.- n
integer indicating the number of data chunks to keep at the start of the file. If this is supplied, then
indices
cannot also be supplied.- indices
integer vector indicating the indices of the data chunks that are to be saved to
outfile
. If this is supplied, thenn
cannot also be supplied.- debug
an integer value indicating the level of debugging. If this is 0, then
read.adp.rdi()
proceeds quietly, except for issuing warnings and errors if necessary. If it is 1, then the R code ofread.adp.rdi()
produces some messages. If it is 2, then also the underlying C/C++ code produces a message each time a possible ensemble is detected. If it is 3, then the C/C++ code also produces information on some details of the ensemble. Levels 2 and 3 are mainly for use by the developers.
See also
Other things related to adp data:
[[,adp-method
,
[[<-,adp-method
,
ad2cpCodeToName()
,
ad2cpHeaderValue()
,
adp
,
adp-class
,
adpAd2cpFileTrim()
,
adpConvertRawToNumeric()
,
adpEnsembleAverage()
,
adpFlagPastBoundary()
,
adp_rdi.000
,
applyMagneticDeclination,adp-method
,
as.adp()
,
beamName()
,
beamToXyz()
,
beamToXyzAdp()
,
beamToXyzAdpAD2CP()
,
beamToXyzAdv()
,
beamUnspreadAdp()
,
binmapAdp()
,
enuToOther()
,
enuToOtherAdp()
,
handleFlags,adp-method
,
is.ad2cp()
,
plot,adp-method
,
read.adp()
,
read.adp.ad2cp()
,
read.adp.nortek()
,
read.adp.rdi()
,
read.adp.sontek()
,
read.adp.sontek.serial()
,
read.aquadopp()
,
read.aquadoppHR()
,
read.aquadoppProfiler()
,
rotateAboutZ()
,
setFlags,adp-method
,
subset,adp-method
,
subtractBottomVelocity()
,
summary,adp-method
,
toEnu()
,
toEnuAdp()
,
velocityStatistics()
,
xyzToEnu()
,
xyzToEnuAdp()
,
xyzToEnuAdpAD2CP()
Other functions that trim data files:
adpAd2cpFileTrim()
,
advSontekAdrFileTrim()
,
oceFileTrim()