zooExtract: Utility to extract a zoo object from a raster time-series

Description Usage Arguments Value Author(s) See Also Examples

Description

This function extracts a zoo object from a multilayer raster object with time written to the z dimension or a date vector supplied externally. The aim of this utility is to facilitate the use of the bfmApp for bfastmonitor parameters investigation. The app allows the user to supply a zoo (time-series) object and visualize the effect of parameters change on the algorithm output. We outline in the vignette of the bfastSpatial package that this is an interesting step for parameter selection prior to more heavy processing when starting to work in a study area.

Usage

1
zooExtract(x, sample = "click", dates = NULL, file = NULL, ...)

Arguments

x

rasterBrick or rasterStack object, or file name to a multilayer raster object stored on disk.

sample

The point(s) to extract. Default to 'click' where a point is interactively choosen by clicking. Or any of object accepted by extract. (points represented by a two-column matrix or data.frame, or SpatialPoints*; SpatialPolygons*; SpatialLines; Extent; or a numeric vector representing cell numbers). For 'click', a layer of x needs to be plotted first.

dates

A date vector (optional, only if time is not yet contained in the z dimension of the raster object, or comprised in its layer names.)

file

character rds filename where to write the output.

...

Arguments to be passed to extract.

Value

A zoo object that may contain multiple time-series

Author(s)

Loic Dutrieux

See Also

sr2vi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Single time-series selected interactively
data(tura)
plot(tura, 2)
zooExtract(x = tura, sample = 'click', file = file.path(tempdir(), 'zooClick.rds'))

# Then in order to explore the time series and the bfastmonitor parameters, run the following line
## Not run: 
runGitHub("bfmApp", "loicdtx")

## End(Not run)
# And upload the file zooClick.rds

dutri001/bfastSpatial documentation built on May 15, 2019, 6:05 p.m.