## S3 method for class 'oce':
window(x, start = NULL, end = NULL,
frequency = NULL, deltat = NULL, extend = FALSE,
which=c("time","distance"), indexReturn=FALSE,
debug=getOption("oceDebug"), ...)
oce
object."time"
, which applies
the windowing on x$data$ts$time
, and "distance"
, which
applies the windowing on x$data$
data$ts
and data$tsSlow
(either of which may be NULL
, if the object lacks those items.oce
object. However, if
indexReturn=TRUE
, the return value is two-element list
containing items named index
and indexSlow
, which are
the indices for data$ts
and data$tsSlow
that are within
the window.x
on either time or distance, depending on the
value of which
. In each case, values of start
and
end
may be integers, to indicate a portion of the time or
distance range. If which
is "time"
, then the
start
and end
values may also be provided as POSIX
times, or character strings indicating times (in time zone
given by the value of getOption("oceTz")
).subset.oce
provides more flexible selection of
subsets.library(oce)
data(adp)
plot(adp)
early <- window(adp, start="2008-06-26 00:00:00", end="2008-06-26 12:00:00")
plot(early)
bottom <- window(adp, start=0, end=20, which="distance")
plot(bottom)
Run the code above in your browser using DataLab