section.subset {oce}R Documentation

Subset a section

Description

Subset a section, by removing stations or rearranging their order.

Usage

subset <- section.subset(section, indices=1:length(section$station))

Arguments

section a section to be subsetted.
indices the index numbers of stations to keep, e.g. the first station in the section has index 1.

Details

Stations with the provided indices are kept, and the rest are deleted. The indices may be in any order, and may contain gaps. Common uses of section.subset include dropping stations that have erroneous data, dropping stations that are separated from a cruise track of interest, and reordering a section so that plot.section will measure distance from a particular station of interest (see Examples).

Value

An object of class "section", containing only the indicated stations, in the indicated order.

Author(s)

Dan Kelley

See Also

Sections are normally created with read.section or make.section.

Examples

library(oce)
data(a03)
# Gulf Stream (note that section runs east to west)
Gulf.Stream <- section.subset(a03, 124:102)
data(coastline.world)
plot(section.grid(Gulf.Stream), coastline=coastline.world, map.xlim=c(-80,-60))

[Package oce version 0.1.72 Index]