analyseTS: analyseTS

Description Usage Arguments Details Value See Also Examples

View source: R/analyseTS.R

Description

Summarizes multi-band raster data within each element of a SpatialPolygons object.

Usage

1
analyseTS(x, y, out.plot = NULL)

Arguments

x

Object of class data.frame.

y

Vector of class character or numeric with a length equal to the number of rows in x.

out.plot

Specifies the data path where plots should be stored.

Details

For each unique value in y, the function will select the rows in x that correspond to it and estimate the median, Median Absolute Deviation (MAD), minimum, maximum, mean and standard deviation for each column. Then, the function will build a plot showing the median and draw a buffer that expresses the minimum and maximum. The final output is a list consisting of:

If out.plot is set, the function will save each plot as 10x10 cm PNG files within the specified path.

Value

A SpatialPointsDataDrame with the coordinate pairs for each of the sampled pixels.

See Also

extractTS phenoCropVal phenoCropClass

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{

require(raster)
require(fieldRS)

# read raster data
r <- brick(system.file("extdata", "ndvi.tif", package="fieldRS"))

# read field data
data(fieldData)
data(fieldDataTS)

a.ts <- analyseTS(as.data.frame(fieldDataTS$weighted.mean), fieldData$crop)

}

RRemelgado/CAWaR documentation built on June 7, 2020, 10:27 p.m.