# NOT RUN {
library(oce)
data(argo)
# Example 1: buset by time, longitude, and pressure
par(mfrow=c(2,2))
plot(argo)
plot(subset(argo, time > mean(time)))
plot(subset(argo, longitude > mean(longitude)))
plot(subset(argoGrid(argo), pressure > 500 & pressure < 1000), which=5)
# Example 2: restrict attention to delayed-mode profiles.
par(mfrow=c(1, 1))
plot(subset(argo, dataMode == "D"))
# Example 3: contrast corrected and uncorrected data
par(mfrow=c(1,2))
plotTS(argo)
plotTS(subset(argo, "adjusted"))
# Example 4. Subset by a polygon determined with locator()
# }
# NOT RUN {
par(mfrow=c(2, 1))
plot(argo, which="map")
bdy <- locator(4) # Click the mouse on 4 boundary points
argoSubset <- subset(argo, within=bdy)
plot(argoSubset, which="map")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab