sectionAddStation {oce} | R Documentation |
Add a CTD profile to an existing section.
sectionAddStation(section, station)
section |
a section to which a station is to be added. |
station |
a ctd object holding data for the station to be added. |
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.
An object of class
section
.
Dan Kelley
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)