section.subset {oce} | R Documentation |
Subset a section, by removing stations or rearranging their order.
subset <- section.subset(section, indices=1:length(section$station))
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. |
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).
An object of class
"section"
,
containing only the indicated stations, in the indicated order.
Dan Kelley
Sections are normally created with read.section
or make.section
.
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))