R: Class to Store Hydrographic Section Data

section-class {oce} | R Documentation

## Class to Store Hydrographic Section Data

### Description

This class stores data from oceanographic section surveys.

### Details

Sections can be read with `read.section` or created with `read.section` or created from CTD objects by using `as.section` or by adding a ctd station to an existing section with `sectionAddStation`.

Sections may be sorted with `sectionSort`, subsetted with `subset,section-method`, smoothed with `sectionSmooth`, and gridded with `sectionGrid`. Gridded sections may be plotted with `plot,section-method`.

Statistical summaries are provided by `summary,section-method`, while overviews are provided by `show`.

The sample dataset `section` contains data along WOCE line A03.

### Slots

`data`

  As with all `oce` objects, the `data` slot for `section` objects is a `list` containing the main data for the object.

`metadata`

  As with all `oce` objects, the `metadata` slot for `section` objects is a `list` containing information about the `data` or about the object itself. Examples that are of common interest include `stationId`, `longitude`, `latitude` and `time`.

`processingLog`

  As with all `oce` objects, the `processingLog` slot for `section` objects is a `list` with entries describing the creation and evolution of the object. The contents are updated by various `oce` functions to keep a record of processing steps. Object summaries and `processingLogShow` both display the log.

### Modifying slot contents

Although the `[[<-` operator may permit modification of the contents of `section` objects (see `[[<-,section-method`), it is better to use `oceSetData` and `oceSetMetadata`, because that will save an entry in the `processingLog` to describe the change.

### Retrieving slot contents

The full contents of the `data` and `metadata` slots of a `section` object named `section` may be retrieved in the standard R way. For example, `slot(section, "data")` and `slot(section, "metadata")` return the `data` and `metadata` slots, respectively. The `[[,section-method` operator can also be used to access slots, with `section[["data"]]` and `section[["metadata"]]`, respectively. Furthermore, `[[,section-method` can be used to retrieve named items (and potentially some derived items) within the `metadata` and `data` slots, the former taking precedence over the latter in the lookup. It is also possible to find items more directly, using `oceGetData` and `oceGetMetadata`, but this cannot retrieve derived items.

### Author(s)

Dan Kelley

### See Also

Other classes provided by `oce`: `adp-class`, `adv-class`, `argo-class`, `bremen-class`, `cm-class`, `coastline-class`, `ctd-class`, `lisst-class`, `lobo-class`, `met-class`, `oce-class`, `odf-class`, `rsk-class`, `sealevel-class`, `topo-class`, `windrose-class`

Other things related to `section` data: `[[,section-method`, `[[<-,section-method`, `as.section`, `handleFlags,section-method`, `initializeFlagScheme,section-method`, `plot,section-method`, `read.section`, `sectionAddStation`, `sectionGrid`, `sectionSmooth`, `sectionSort`, `section`, `subset,section-method`, `summary,section-method`

### Examples

    library(oce)
    data(section)
    plot(section[['station', 1]])
    pairs(cbind(z=-section[["pressure"]],T=section[["temperature"]],S=section[["salinity"]]))
    ## T profiles for first few stations in section, at common scale
    par(mfrow=c(3,3))
    Tlim <- range(section[["temperature"]])
    ylim <- rev(range(section[["pressure"]]))
    for (stn in section[["station", 1:9]])
        plotProfile(stn, xtype='potential temperature', ylim=ylim, Tlim=Tlim)

[Package oce version 1.0-1 Index]