% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adp.nortek.ad2cp.R
\name{ad2cpHeaderValue}
\alias{ad2cpHeaderValue}
\title{Infer an Item From a Nortek AD2CP File Header}
\usage{
ad2cpHeaderValue(x, key, item, numeric = TRUE, default, plan = 0, debug = 0)
}
\arguments{
\item{x}{an \linkS4class{adp} object that holds AD2CP data.}

\item{key}{character value that identifies a particular line in the file
header.}

\item{item}{character value indicating the name of the item sought.}

\item{numeric}{logical value indicating whether to convert the return value
from a string to a numerical value.}

\item{default}{optional value to be used if the item is not found in the
header, or if the header is \code{NULL} (as in the case of a split-up file
that lacks the initial header information)}

\item{plan}{integer specifying the plan, with the same
meaning as for \code{\link[=read.adp.ad2cp]{read.adp.ad2cp()}}.}

\item{debug}{integer indicating degree of debugging information
to be printed during processing. The default value of 0 means to
work quietly.}
}
\value{
\code{ad2cpHeaderValue} returns a character value or number interpreted
from the output from \code{x[["text"]]}, or \code{NULL}, if the desired item is not
found there, or if \code{x} is not of the required class and variety.
}
\description{
Infer an Item From a Nortek AD2CP File Header
}
\section{Sample of Usage}{

\preformatted{
if (file.exists("a.ad2cp")) {
    d <- read.oce("a.ad2cp")
    # The examples start with the line in x[["text"]][[1]]; note that in the second
    # example, it would be insuficient to use a key of "BEAMCFGLIST", because that will
    # yield 4 lines, and the function is not designed to handle that.

    # ID,STR=\"Signature1000\",SN=123456
    type <- ad2cpHeaderValue(d, "ID", "STR", numeric=FALSE)
    serialNumber <- ad2cpHeaderValue(d, "ID", "SN")

    # BEAMCFGLIST,BEAM=1,THETA=25.00,PHI=0.00,FREQ=1000,BW=25,BRD=1,HWBEAM=1,ZNOM=60.00
    beam1Angle <- ad2cpHeaderValue(d, "BEAMCFGLIST,BEAM=1", "THETA")
    frequency <- ad2cpHeaderValue(d, "BEAMCFGLIST,BEAM=1", "FREQ", default=NA)
}
}
}

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

Other things related to ad2cp data: 
\code{\link{ad2cpCodeToName}()},
\code{\link{adpAd2cpFileTrim}()},
\code{\link{is.ad2cp}()},
\code{\link{read.adp.ad2cp}()}
}
\author{
Dan Kelley
}
\concept{things related to ad2cp data}
\concept{things related to adp data}
