addSpine: Add a Spine to a section Object

View source: R/section.R

addSpineR Documentation

Add a Spine to a section Object

Description

The purpose of this is to permit plotting with xtype="spine", so that the section plot will display the distance of stations projected onto the spine.

Usage

addSpine(section, spine, debug = getOption("oceDebug"))

Arguments

section

a section object.

spine

either a list or a data frame, containing numeric items named longitude and latitude, defining a path along the spine.

debug

an integer specifying whether debugging information is to be printed during the processing. This is a general parameter that is used by many oce functions. Generally, setting debug=0 turns off the printing, while higher values suggest that more information be printed. If one function calls another, it usually reduces the value of debug first, so that a user can often obtain deeper debugging by specifying higher debug values.

Value

A section object with a spine added.

Author(s)

Dan Kelley

Examples

library(oce)
data(section)
eastern <- subset(section, longitude < (-65))
spine <- list(
    longitude = c(-74.5, -69.2, -55),
    latitude = c(38.6, 36.25, 36.25)
)
easternWithSpine <- addSpine(eastern, spine)
# plot(easternWithSpine, which="map")
# plot(easternWithSpine, xtype="distance", which="temperature")
# plot(easternWithSpine, xtype="spine", which="temperature")


oce documentation built on Sept. 11, 2024, 7:09 p.m.