library(oce)
data(RRprofile)
ctd <- as.ctd(RRprofile$salinity,RRprofile$temperature,RRprofile$depth)
plotProfile(ctd, "T", Tlim=c(2,9))
ctd2 <- ctdDecimate(ctd,p=seq(0,2000,1),method="reiniger-ross")
lines(temperature(ctd2), pressure(ctd2), col="blue")
Run the code above in your browser using DataLab