sectionSort {oce} | R Documentation |
Sort a section
sectionSort(section, by)
section |
a |
by |
an optional string indicating how to reorder. If not provided,
|
Sections created with as.section
have
"stations" that are in the order of the CTD objects (or filenames for
such objects) provided. Sometimes, this is not the desired order,
e.g. if file names discovered with dir
are in an order
that makes no sense. (For example, a practioner might name stations
"stn1"
, "stn2"
, etc., not realizing that this will yield
an unhelpful ordering, by file name, if there are more than 9 stations.)
The purpose of sectionSort
is to permit reordering the
constituent stations in sensible ways.
An object of class
"section"
that has less
lateral variation than the input section.
Dan Kelley
The documentation for section-class
explains the
structure of section objects, and also outlines the other functions dealing
with them.
## Not run: # Eastern North Atlantic, showing Mediterranean water; # sorting by longitude makes it easier to compare # the map and the section. library(oce) data(section) s <- sectionGrid(subset(section, -30 <= longitude)) ss <- sectionSort(ss, by="longitude") plot(ss) ## End(Not run)