library(oce)
odf <- read.odf(system.file("extdata", "CTD_BCD2014666_008_1_DN.ODF", package="oce"))
# Figure 1. make a CTD, and plot (with span to show NS)
plot(as.ctd(odf), span=500, fill='lightgray')
# show levels with bad QC flags
subset(odf, flag!=0)
# Figure 2. highlight bad data on TS diagram
plotTS(odf, type='o') # use a line to show loops
bad <- odf[["flag"]]!=0
points(odf[['salinity']][bad],odf[['temperature']][bad],col='red',pch=20)
Run the code above in your browser using DataLab