Learn R Programming

bfastSpatial (version 0.6.2)

countObs: Valid observations per pixel

Description

Calculates the number of valid observations per pixel of a time series RasterBrick.

Usage

countObs(x, navalues = c(NA), sensor = NULL, as.perc = FALSE, ...)

Arguments

x

RasterBrick or RasterStack

navalues

Integer. Values representing NA's in time series. Defaults to NA, but multiple values can be supplied (e.g. navalue = c(0, NA))

as.perc

Logical. Express result as a percentage of nlayers(x)?

...

Arguments to be passed to mc.calc

Value

A raster layer with the number of valid observations per pixel, either as an absolute value or expressed as a percent of nlayers(x) if is.perc = TRUE.

See Also

summaryBrick