Add a CTD profile to an existing section.
Value
A section object.
Historical note
Until March 2015, this operation was carried out with the +
operator,
but at that time, the syntax was flagged by the development version of R, so it
was changed to the present form.
See also
Other things related to section data:
[[,section-method
,
[[<-,section-method
,
as.section()
,
handleFlags,section-method
,
initializeFlagScheme,section-method
,
plot,section-method
,
read.section()
,
section
,
section-class
,
sectionGrid()
,
sectionSmooth()
,
sectionSort()
,
subset,section-method
,
summary,section-method
Examples
library(oce)
data(ctd)
ctd2 <- ctd
ctd2[["temperature"]] <- ctd2[["temperature"]] + 0.5
ctd2[["latitude"]] <- ctd2[["latitude"]] + 0.1
section <- as.section(c("ctd", "ctd2"))
ctd3 <- ctd
ctd3[["temperature"]] <- ctd[["temperature"]] + 1
ctd3[["latitude"]] <- ctd[["latitude"]] + 0.1
ctd3[["station"]] <- "Stn 3"
sectionAddStation(section, ctd3)
#> Unnamed section has 3 stations:
#> Index ID Lon Lat Levels Depth
#> 1 Stn 2 -63.644 44.684 181 NA
#> 2 Stn 2 -63.644 44.784 181 NA
#> 3 Stn 3 -63.644 44.784 181 NA